Question
#include void encryptCaesar(char*, unsigned char); void decryptCaesar(char*, unsigned char); void toUpper(char*); int main() { char plain[] = Friends, Romans, countrymen, lend me your ears; char
#include
void encryptCaesar(char*, unsigned char); void decryptCaesar(char*, unsigned char); void toUpper(char*);
int main() { char plain[] = "Friends, Romans, countrymen, lend me your ears"; char cipher[] = "Mvez, mzuz, mztz (Z trdv, Z jrn, Z tfehlvivu)";
printf("%s ", plain); toUpper(plain); printf("%s ", plain); encryptCaesar(plain, 5); printf("%s ", plain); decryptCaesar(plain, 5); printf("%s ", plain);
return 0; }
void toUpper(char *text) { int i = 0; while (text[i] != '\0') { if (text[i] >= 'a' && text[i] <= 'z') { text[i] -= 32; } i++; } }
void encryptCaesar(char *plaintext, unsigned char key) { 1,1 Top
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started