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

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!