Question: Please help! Programming in C. Having issues solving this problem. Some of the code inside of the program you are not allowed to change and

 Please help! Programming in C. Having issues solving this problem. Some

Please help! Programming in C. Having issues solving this problem. Some of the code inside of the program you are not allowed to change and is as follows;

#include

#include

#include

#include

// ---------------------- DO NOT MODIFY THIS SECTION --------------------------------

#define MAX_PGRAPH_LENGTH 100

#define MAX_WORD_LENGHT 20

int main(void) {

// definitions

char plaintext[MAX_PGRAPH_LENGTH];

char ciphertext[MAX_PGRAPH_LENGTH] = "";

char input[MAX_WORD_LENGHT];

// read the key

int key;

scanf("Key: %d, ", &key);

// read text

scanf("Input: ");

while (true)

{

scanf("%s", input);

if (strlen(ciphertext) + strlen(input) + 1 > MAX_PGRAPH_LENGTH)

break;

strcat(ciphertext, input);

strcat(ciphertext, " ");

}

ciphertext[strlen(ciphertext) - 1] = '\0';

// ---------------------- -----------------------------------------------------------

/*

Your code goes here!

*/

// ---------------------- DO NOT MODIFY THIS SECTION --------------------------------

printf(" Key: %d ", key);

printf(" Input: %s ", ciphertext);

printf("Output: %s ", plaintext);

// ---------------------- -----------------------------------------------------------

}

13.12 Caesar Cipher v3 (Decryption) A Caesar cipher is one of the first and most simple encryption methods. It works by shifting all letters in the original message (plaintext) by a certain fixed amount (the amounts represents the encryption key). The resulting encoded text is called ciphertext. Example Key (Shift): 3 Plaintext: Abc Ciphertext: Def Task Your goal is to implement a Caesar cipher program that receives the key and an encrypted paragraph (with uppercase and lowercase letters, punctuations, and spaces) and decrypt it. Requirements Only letters must be decrypted, any other character must remain unchanged Note: The whole paragraph is going to be given to you as a string (char array). Review the template code for more details LCTVITY 13.12.1: Caesar Cipher vs (Decryption) 0/30 decrypt.c Load default template... 1 #include 2 #include stdbool.h> #include #include 4 DO NOT MODIFY THIS SECTION-- 7 #define MAX PGRAPH LENGTH lee 8 #define MAX WORD LENGHT 2e int nain(void) ( 11 / definitions 12 char plaintext [MAX PGRAPH LENGTH]: 3 char ciphertext [MAX PGRAPH LENGTH] - 14 char input [MAX WORD LENGHT] 16 read the key 7int key 18 scanf("Key: %d, "" &key); 2 read text 1SCanf Input: When done developing your program, press the Submit for grading button below. This will submit your program for auto-grading. Develop mode Submit mode

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!