Question: Write a program that will ask the user to enter the name of a file. Your program should then ask the user to enter 'encrypt'
Write a program that will ask the user to enter the name of a file. Your program
should then ask the user to enter 'encrypt' or 'decrypt'.
If the user enters anything else your program should print an error message and exit.
If they entered 'encrypt' your program should open the file and encrypt it by shifting
each character including white space values to the right.
If they entered 'decrypt' your program should open the file and decrypt it by shifting
each character including white space values to the left.
If the file fails to open your program should print an error message and exit.
The decrypted or encrypted message should be displayed on the screen and also
written to an output file named message.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
