Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
17
Task/Rot-13/Chipmunk-Basic/rot-13.basic
Normal file
17
Task/Rot-13/Chipmunk-Basic/rot-13.basic
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
100 rem ROT-13
|
||||
110 cls : rem 110 HOME for Applesoft BASIC
|
||||
120 input "Enter a string: ";a$
|
||||
130 gosub 160
|
||||
140 print b$
|
||||
150 end
|
||||
160 rem FUNCTION rot13
|
||||
170 for i = 1 to len(a$)
|
||||
180 n = asc(mid$(a$,i,1))
|
||||
190 e = 255
|
||||
200 if n > 64 and n < 91 then e = 90 : rem uppercase
|
||||
210 if n > 96 and n < 123 then e = 122 : rem lowercase
|
||||
220 if e < 255 then n = n+13
|
||||
230 if n > e then n = n-26
|
||||
240 b$ = b$+chr$(n)
|
||||
250 next
|
||||
260 return
|
||||
Loading…
Add table
Add a link
Reference in a new issue