Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a C program that implements a Caesar cipher with the following requirements: For the original string variable where you will keep the

Write a "C" program that implements a Caesar cipher with the following requirements:
For the original string variable where you will keep the original encrypted message provided by the user, please use the following declaration:
char GarciaStr[80];
In cryptography, a Caesar cipher, is one of the simplest encryption techniques. It is a substitution cipher in which each letter is replaced by a letter some fixed number of positions down the alphabet.
You have been tasked with the decryption of a message that has been encrypted with the Caesar cipher.
Write a program that reads an encrypted message from the keyboard, and to decrypt replace each character in that sentence by another character that is five (5) character positions to the left in the English alphabet and print the resulting decrypted text including spaces between words in upper case format.
Program requirements:
Ask and read the encrypted text message.
Ask and read the integer number.
Create a brand-NEW string variable to save the decrypted message using the Caesar cipher.
Extract the digits of the integer number. Each digit of the integer number is the length of a word in the message.
Decrypt the original message by replacing each letter with the letter in the English alphabet five (5) positions to the left. This new decrypted message MUST be created in the brand-new string variable you created previously.
Don't forget to include one single space between each pair of words.
Print the string that contains the final decrypted message using one single printf: printf(%s, dMessage);
As for what happens to the letters 'abcde', the program MUST use a circular alphabet, where the next character to the right after z is a, which means that when replacing the characters in the original text you will find 5 special cases (a,b,c,d, and e)
_________________________________________
Any help as quick as possible would be amazing! Thank you! Attached is the expected output!
image text in transcribed

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

Learning PostgreSQL

Authors: Salahaldin Juba, Achim Vannahme, Andrey Volkov

1st Edition

178398919X, 9781783989195

More Books

Students also viewed these Databases questions