Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
12
Task/Rot-13/Nim/rot-13.nim
Normal file
12
Task/Rot-13/Nim/rot-13.nim
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
import strutils
|
||||
|
||||
proc rot13(c): char =
|
||||
case toLower(c)
|
||||
of 'a'..'m': chr(ord(c) + 13)
|
||||
of 'n'..'z': chr(ord(c) - 13)
|
||||
else: c
|
||||
|
||||
for line in stdin.lines:
|
||||
for c in line:
|
||||
stdout.write rot13(c)
|
||||
stdout.write "\n"
|
||||
Loading…
Add table
Add a link
Reference in a new issue