SLIDE 9 Lecture 4 ENGR/CS 101 Computer Science Session 9
Program Specification
Now we will modify today's program to do the
following:
Ask the user for an uppercase key letter (to represent shift
A-> key) then repeatedly ask for an uppercase line to encipher with this key until the user types ".."
Display the corresponding ciphertext for each line. The
- utput should preserve whitespace and non-alphabetic
characters.
Example run (user input in bold):
Enter an uppercase key letter: I Enter an uppercase line to encipher (.. to quit): GO ACES! The corresponding ciphertext line is: OW IKMA! Enter an uppercase line to encipher (.. to quit): *CS IS FUN* The corresponding ciphertext line is: *KA QA NCV* Enter an uppercase line to encipher (.. to quit): ..