Due: Monday, March 7, 2016
Read Lesson #14 and Lesson #15 in my C tutorial.
Write a filter program that transforms all characters in its input according to the ROT-13 algorithm. ROT-13 works as follows:
If the character is an upper case letter, add 13 to its ASCII code, wrapping around
at 'Z' if necessary. This means if the resulting ASCII code, code
, is greater
than 'Z', the amount code - 'Z' - 1
should be added to 'A' to get the updated
code
.
If the character is a lower case letter, add 13 to its ASCII code, wrapping around at 'z' if necessary.
Otherwise, do nothing to the character.
Write a function rot13
that takes a character and that returns a character to
perform this operation. Use rot13
in your main program.
Submit your program to Moodle (the .c file). Be sure it includes a comment block at the top that includes your name, the name of the file, the date, and a brief description of what the program does.
Last Revised: 2024-12-17
© Copyright 2024 by Peter Chapin <peter.chapin@vermontstate.edu>