So I have not programmed in a couple years and last week my professor gave the class an assignment that is kinda tricky. I got most of the program to do what it is supposed to do, but there are a couple problems.

First of a short summary of the assignment:
Problem: Simple encryption/decryption of text will be investigated in this assignment.

Background: Alphabet rotation
• Rotate characters within the alphabet sequence
o For example, A rotated forward 4 is E
o For example, b rotated backward 2 is z
• Applied only to letters. All other characters remain unchanged
• Uppercase remains upper, lowercase remains lower

Encryption algorithm v0:
• +1, -2, +3, -4, +1, -2, +3, -4, … repeating sequence of rotates for the entire string
• Non-letters still take up the space in the sequence even though the rotation is not applied
• For example:
o My pc!  Nw ld!


Basically, the user enters a string and it is then encrypted to the above algorithm. Encryption is not applied to the non letters, but they still take up a place in the algorithm.

My Problem:
I got the encryption to work unless, for example, the letter 'a' were to fall in the -2 slot. I don't know how to make it roll back and read 'y'. Also when I tried the "My pc!" example the '!' does not show up, everything else worked perfect. Hopefully it is just some simple mistake.

After typing all this I found out VMware wont let me copy my code from my virtual box, I will reply to this with the code I have.

Edit:
Some reason the ".h" after stdio and string wont show up. They are in my code though. Actually alot of the code is broken after pasting it in here. Even when using the code tags. :S Fixed it I think, had to un-check some boxes that were conflicting with the post. The code should be correct now.