Challenge: Caesar's Cipher | Sololearn: Learn to code for FREE!

+3

Challenge: Caesar's Cipher

 Caesar cipher is one of the earliest known and simplest ciphers. It is a type of substitution cipher in which each letter in the plaintext is 'shifted' a certain number of places down the alphabet. For example, with a shift of 1, A would be replaced by B, B would become C, and so on. INPUT first line of input is N denoting the number of shifts to be done second line of input is the text to be ciphered OUTPUT encoded message CONSTRAINTS 0 < N < 2^32 Sample 1 uvwxyz vwxyza 5 defend ijkjsi

12/8/2017 4:39:04 PM

Reniel Galerio

7 Answers

New Answer

+12

Hey, this is the first Python code, it's one-liner. And accepts any value of N https://code.sololearn.com/cRIls1hkNrIk/?ref=app

+8

https://code.sololearn.com/c4273uXNh86f/?ref=app

+5

If you only want to shift letters in range A-Z a-z, then mine is not for you 😢, anyway take a look 😀. https://code.sololearn.com/c2wYX9yU8Lik/?ref=app

+3

here's my code https://code.sololearn.com/cPLdGQMowK5n/?ref=app

+3

is it good? https://code.sololearn.com/c05AIqYKFU1t/?ref=app

+3

https://code.sololearn.com/cC7DOOS1DuDb/?ref=app This was written in c, then modified to accept input in the c++ code playground. It will also accept the shift as first input or from the command line (not both) if built using a compiler. Also first command line argument is a d then it will decide, ie the shift is in the other direction.

+2

https://code.sololearn.com/cyuN38uMKsil/?ref=app Works good :O Greetings :D