Question
C/C++ Description A Caesar cipher is one of the first and most simple encryption methods. It works by shifting all letters in the original message
C/C++
Description
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 certain fixed amount (the amounts represents the encryption key). The resulting encoded text is called ciphertext.
Example
Key (Shift): 3 Plaintext: ABC Ciphertext: DEF
Since we haven't discussed char and strings consider the letters in the alphabet to be a number starting at 0 and ending at 25. A -------> 0 Z -------> 25
Task
Your goal is to implement a Caesar cipher program that receives a single encrypted letter and decrypt it.
Requirements
Read input from keyboard using the scanf function expecting inputs in the following format "%d %d" (the first element being the key and the second one the ciphertext).
Output only the result strictly using the following format "%d" (the plaintext).
Note: You cannot use any control statement even if you know it! (ifthem statements).
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