Anonymous user
Caesar cipher: Difference between revisions
Updated D code
(Updated D code) |
|||
Line 176:
=={{header|D}}==
<lang d>import std.stdio, std.
foreach (
if (
else if (
return
}
Line 203 ⟶ 204:
Decrypted: The five boxing wizards jump quickly</pre>
Simpler in-place version (same output):
<lang d>import std.stdio, std.
void inplaceRot(char[] txt, in int key) pure nothrow {
foreach (ref c; txt) {
if (
c =
else if (
c =
}
}
|