Home / Expert Answers / Computer Science / write-a-program-that-will-encrypt-decrypt-messages-create-a-menu-that-asks-the-user-whether-they-pa660

(Solved): Write a program that will encrypt/decrypt messages. Create a menu that asks the user whether they ...



Write a program that will encrypt/decrypt messages.

  1. Create a menu that asks the user whether they want to (in this order):

    1. Change shift value
      • Make sure you set it to 3 by default
      • When testing, I don't recommend using anything higher than 10
    2. Encrypt a message
    3. Decrypt a message
    4. Quit
  2. The user should then be able to type in a message up to 500 characters in length that will be encrypted/decrypted

    • You will use what is called a shift cipher to encrypt the messages
    • A shift cipher takes your input, goes through it one letter at a time, and "shifts" that value a certain amount of places to change its value
    • Your program should encrypt messages by subtracting a value from the character, and decrypt by adding that value.
  3. Your program should continue to bring up the main menu until the user selects the option to quit.

Requirements:

Use the following ideas:

  • functions
  • function returns
  • function parameters
  • strings
  • loops
  • if statements


We have an Answer from Expert

View Expert Answer

Expert Answer


ANSWER : #include #include int shift = 3; int getUserChoice(){ printf("1. Change shift value\n"); printf("2. Encrypt\n"); printf("3. Decrypt\n"); printf("4. Quit\n"); printf("Enter your choice: "); int choice = 0; scanf("%d", &ch
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe