Caesar Cipher

Specification


This is similar to the Caesar Cipher exercise as we did with Python. However, in C language, the char data type is actually handled as integers, so you don't need the ord() and chr() functions to convert characters to integers, or vice versa. This is where C language seems to be more convenient and powerful.

The pseudo code of the program may look like:

============
Get a word to encode.
Get a number as the key.
For each character ch in the word, 
    output ch + key.

The program may run as below:

Please input the plaintext -- XYZABC

Please input your key -- 3

ABCDEF