**New course!**Every coder should learn

**Generative AI!**

+ 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!"

1 Answer

+ 1

👏👍