RosettaCodeData/Task/Repeat-a-string/Chipmunk-Basic/repeat-a-string.basic

13 lines
266 B
Text
Raw Permalink Normal View History

2023-12-16 21:33:55 -08:00
100 cls
110 print stringrepeat$("rosetta",1)
120 print stringrepeat$("ha",5)
130 print stringrepeat$("*",5)
140 end
150 function stringrepeat$(s$,n)
160 cad$ = ""
170 for i = 1 to n
180 cad$ = cad$+s$
190 next i
200 stringrepeat$ = cad$
210 end function