Question: C- Language Progamming In this assignment you will use your knowledge of strings to write a program that will encrypt/decrypt messages. Your program should: -
C- Language Progamming
In this assignment you will use your knowledge of strings to write a program that will encrypt/decrypt messages. Your program should: - ask the user whether they want to: Change shift value, make sure you set it to 3 by default, although I don't reccommend going higher than 4 Encrypt a message Decrypt a message Quit - 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 cypher takes your input and goes through it one letter at a time and "shifts" that value a certain amount of places to change its value - Your program should continue to bring up the main menu until the user selects the option to quit.
Requirements: Use the following: - int getUserChoice() - int getShift() - void getString(char buf[]) - void encrypt(char buf[], int shift) - void decrypt(char buf[], int shift)
Your program should either quit or handle invalid menu options. - getString() will be used to get the string the user wants encrypted * These are the only 3 functions scanf() or fgets() are allowed to appear in. This means input functions cannot appear in main() * Your default shift value should be set to 3 * DO NOT encrypt/decrypt the newline ( ) character or NULL terminator (\0) character in your strings
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
