Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,29 @@
Declare.s Rot13(text_to_code.s)
If OpenConsole()
Define txt$
Print("Enter a string to encode: "): txt$=Input()
PrintN("Coded : "+Rot13(txt$))
PrintN("Decoded: "+Rot13(Rot13(txt$)))
Print("Press ENTER to quit."): Input()
CloseConsole()
EndIf
Procedure.s Rot13(s.s)
Protected.i i
Protected.s t, u
For i=1 To Len(s)
t=Mid(s,i,1)
Select Asc(t)
Case Asc("a") To Asc("m"), Asc("A") To Asc("M")
t=chr(Asc(t)+13)
Case Asc("n") To Asc("z"), Asc("N") To Asc("Z")
t=chr(Asc(t)-13)
EndSelect
u+t
Next
ProcedureReturn u
EndProcedure