C: Problem in Caesar Cipher | Sololearn: Learn to code for FREE!

+1

C: Problem in Caesar Cipher

Hi all, Just a noob here. I tried to implement basic Caesar cipher in C. More generally, Caesar’s algorithm (i.e., cipher) encrypts messages by "rotating" each letter by k positions. More formally, if p is some plaintext (i.e., an unencrypted message), pi is the ith character in p, and k is a secret key (i.e., a non-negative integer) My code seems to have a problem; I have found the problem already. But will you be able to find it? And will you be able explain it? To make things easier, I have predefined the key(k) in the code. All you have to do to is to enter a plain text. the program in return will show the encrypted text. You can find my code here: https://code.sololearn.com/c4fJFx8QDB8W/?ref=app Quick tip: try entering "Hello, world!"

6/1/2018 12:46:16 PM

heduson satchi

1 Answer

New Answer

+1