Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
32
Task/Rot-13/XBasic/rot-13.basic
Normal file
32
Task/Rot-13/XBasic/rot-13.basic
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
PROGRAM "Rot-13"
|
||||
VERSION "0.0000"
|
||||
|
||||
DECLARE FUNCTION Entry ()
|
||||
|
||||
FUNCTION Entry ()
|
||||
dec$ = ""
|
||||
TYPE$ = "cleartext "
|
||||
ctext$ = ""
|
||||
iOffset = 13 'offset assumed to be 13 - uncomment line 11 to change
|
||||
|
||||
PRINT "For decrypt enter " + "<d> " + " -- else press enter > ";
|
||||
dec$ = INLINE$("")
|
||||
PRINT
|
||||
|
||||
IF LCASE$(dec$) = "d" THEN
|
||||
iOffset = 26 - iOffset
|
||||
TYPE$ = "ciphertext "
|
||||
END IF
|
||||
|
||||
PRINT "Enter " + TYPE$; '' + "> ";
|
||||
cad$ = UCASE$(INLINE$("> "))
|
||||
|
||||
FOR i = 1 TO LEN(cad$)
|
||||
iTemp = ASC(MID$(cad$,i,1))
|
||||
IF iTemp > 64 AND iTemp < 91 THEN
|
||||
iTemp = ((iTemp - 65) + iOffset) MOD 26
|
||||
PRINT CHR$(iTemp + 65);
|
||||
END IF
|
||||
NEXT i
|
||||
END FUNCTION
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue