Rotate Thirteen

This is a pair exercise and must be competed in your tutorial or lab with your partner.

In this activity, you need to complete a function called rotateThirteen which takes a string and rotates each character by thirteen positions in the alphabet.

To see more about this algorithm, check out the wikipedia article.

Download rotateThirteen.c, or copy it into your current directory on a CSE system by running

$ cp /web/cs1511/17s2/week05/files/rotateThirteen.c .

You will need to use your stringsEqual function from the stringsEqual activity this week for tests to work.

You may want to use your rotateOne function from the rotateOne activity.

You may want to use your stringLength function from the stringLength activity.

To run some simple automated tests:

$ 1511 autotest rotateThirteen

To run Styl-o-matic:

$ 1511 stylomatic rotateThirteen.c
Looks good!

You’ll get advice if you need to make changes to your code.

Submit your work with the give command, like so:

$ give cs1511 wk05_rotateThirteen

Or, if you are working from home, upload the relevant file(s) to the wk05_rotateThirteen activity on Give Online.