ROT13 that takes the character in al and returns the (possibly) rotated character in the al.
ROT13 (short for ROTate 13 characters) has been in use since the start of the Internet. The purpose was to provide a mechanism where text could/would not be accidently read (example: is you were speaking about the ending of a mystery story).
The ROT13 algorithm is as follows:
The letters A through M are mapped to the letters N thorugh Z. The letters N through Z are mapped to the letters A through M. All other characters (digits, punctuation, spacing, etc) are left uneffected.
Example: The word AND is mapped to the word NAQ through ROT13. The word NAQ is sent back to AND when a ROT13 is performed on it.
Remember, the lowercase letters and uppercase letters are different.
Verify that your program works correctly. Type in:
If you then type the message you get out into your program, you should get what is above.Vs lbh pna ernq guvf, gura lbhe cebtenz JBEXF!
|