new tasks
This commit is contained in:
parent
2a4d27cea0
commit
80737d5a6a
1194 changed files with 15353 additions and 1 deletions
13
Task/Binary_strings/BASIC/binary_strings.bas
Normal file
13
Task/Binary_strings/BASIC/binary_strings.bas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
10 REM create two strings
|
||||
20 LET s$ = "Hello"
|
||||
30 LET t$ = "Bob"
|
||||
40 REM choose any random character
|
||||
50 LET c = INT(RND*256)
|
||||
60 REM add the character to the string
|
||||
70 LET s$ = s$ + CHR$(c)
|
||||
80 REM check if the string is empty
|
||||
90 IF s$ = "" THEN PRINT "String is empty"
|
||||
100 REM compare two strings
|
||||
110 IF s$ = t$ THEN PRINT "Strings are the same"
|
||||
120 REM print characters 2 to 4 of a string (a substring)
|
||||
130 PRINT s$(2 TO 4)
|
||||
Loading…
Add table
Add a link
Reference in a new issue