RosettaCodeData/Task/Repeat-a-string/BASIC256/repeat-a-string.basic

13 lines
201 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
function StringRepeat$ (s$, n)
cad$ = ""
for i = 1 to n
cad$ += s$
next i
return cad$
end function
print StringRepeat$("rosetta", 1)
print StringRepeat$("ha", 5)
print StringRepeat$("*", 5)
end