Home / Expert Answers / Computer Science / write-in-c-programnext-is-a-classic-topic-caesar-ciphercaesar-cipher-english-caesar-cipher-als-pa313

(Solved): Write in C programNext is a classic topic: Caesar CipherCaesar cipher (English: Caesar cipher), als ...



Write in C program

Next is a classic topic: Caesar Cipher

Caesar cipher (English: Caesar cipher), also known as Caesar cipher, Caesar transformation, transformation cipher, is one of the simplest and most well-known encryption techniques. The Caesar cipher is a substitution encryption technique in which all letters in the plaintext are replaced with ciphertext after being shifted backwards (or forwards) by a fixed number in the alphabet. For example, when the offset is 3, all letters A will be replaced with D, B with E, and so on. This encryption method is named after Caesar during the Roman Republic, who is said to have used this method to communicate with his generals.


Write a program to perform Caesar encryption (25%)


Enter description:

Enter a string on the first line. The length of the string should be less than 10,000 characters, with only uppercase letters and spaces.

The second line enters the offset offset, which is int.


Output description:

Outputs the encrypted string, and spaces are not encrypted.


Example input 1:

THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

3


Example output 1:

WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ


Example input 2:

THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG

-twenty three

U
Example output 2:

WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ

student submitted image, transcription available below
4. ??????????:???? ????????Caesar cipher??????????????????,???????????????????????????????, ???????????????? (???) ??????????????????????, ?????3???, ?????A????? ?? , ???????????????????????????, ????????????????????? ?????????????(25\%) ????: ?????????, ?????? 10000 ??, ??????????????????offset, offset?int? ????: ????????, ???????? ???? 1 : THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG ????1: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ ????2: THE QUICK BROWN FOX JUMPS OVER THE LAZY DOG ????2: WKH TXLFN EURZQ IRA MXPSV RYHU WKH ODCB GRJ


We have an Answer from Expert

View Expert Answer

Expert Answer



We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe