Data update
This commit is contained in:
parent
35bcdeebf8
commit
74c69a0df6
2427 changed files with 31826 additions and 3468 deletions
21
Task/Repeat-a-string/XBasic/repeat-a-string.basic
Normal file
21
Task/Repeat-a-string/XBasic/repeat-a-string.basic
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
PROGRAM "Repeat a string"
|
||||
VERSION "0.0000"
|
||||
|
||||
DECLARE FUNCTION Entry ()
|
||||
DECLARE FUNCTION StringRepeat$ (s$, n)
|
||||
|
||||
FUNCTION Entry ()
|
||||
|
||||
PRINT StringRepeat$ ("rosetta", 1)
|
||||
PRINT StringRepeat$ ("ha", 5)
|
||||
PRINT StringRepeat$ ("*", 5)
|
||||
|
||||
END FUNCTION
|
||||
FUNCTION StringRepeat$ (s$, n)
|
||||
cad$ = ""
|
||||
FOR i = 1 TO n
|
||||
cad$ = cad$ + s$
|
||||
NEXT i
|
||||
RETURN cad$
|
||||
END FUNCTION
|
||||
END PROGRAM
|
||||
Loading…
Add table
Add a link
Reference in a new issue