Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

#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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

More Books

Students also viewed these Databases questions