
please wait
A program that reads text from a file and encrypts it by using a simple technique. The encryption is done simply by replacing each character in the file with its successor. |
char encrypt(char);
For instance, “a” is replaced with “b” or “c” is replaced with “d”. A “z” should be replaced with an “a”. The program must be able to handle both lowercase and capital letters. |
|
|
It should also be able to decrypt the encrypted file... |
char decrypt(char);
The program should give the user a choice between encrypting or decrypting a file. |
|
|
the program should allow the user to specify the names of the input and output files, |
// prompt for input and output files
then do the process according to the option chosen by the user. |
|
|
Display both the input file and the output file on the screen after the processing has been done. |
|
|
A program that reads text from a file and encrypts it by using a simple technique. The encryption is done simply by replacing each character in the file with its successor. For instance, “a” is replaced with “b” or “c” is replaced with “d”. A “z” should be replaced with an “a”. The program must be able to handle both lowercase and capital letters. It should also be able to decrypt the encrypted file by replacing each character of the encrypted file with its predecessor. For instance, “b” is replaced with “a” or “d” is replaced with “c”. An “a” should be replaced with a “z”. The program should give the user a choice between encrypting or decrypting a file.If the user chooses either of the options, the program should allow the user to specify the names of the input and output files, and then do the process according to the option chosen by the user. It should then save the result to the specified output file name. Display both the input file and the output file on the screen after the processing has been done. |