Jump to content

Caesar cipher: Difference between revisions

Added Easylang
imported>Jcubic
(correct the code that given wrong results)
(Added Easylang)
Line 2,427:
Encrypted: Ufhp rd gtc bnym knaj itejs qnvztw ozlx.
Decrypted: Pack my box with five dozen liquor jugs.</pre>
=={{header|EasyLang}}==
<syntaxhighlight>
func$ crypt str$ key .
for c$ in strchars str$
c = strcode c$
if c >= 65 and c <= 90
c = (c + key - 65) mod 26 + 65
elif c >= 97 and c <= 122
c = (c + key - 97) mod 26 + 97
.
enc$ &= strchar c
.
return enc$
.
enc$ = crypt "Rosetta Code" 4
print enc$
print crypt enc$ -4
</syntaxhighlight>
 
=={{header|EDSAC order code}}==
The EDSAC had only upper-case letters, which were represented by 5-bit codes.
Line 2,669 ⟶ 2,688:
ENTER MESSAGE
</pre>
 
=={{header|Eiffel}}==
<syntaxhighlight lang="eiffel">
2,041

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.