RosettaCodeData/Task/Repeat-a-string/Euphoria/repeat-a-string-1.euphoria
Ingy döt Net b83f433714 tasks a-s
2013-04-10 23:57:08 -07:00

16 lines
350 B
Text

function repeat_string(object x, integer times)
sequence out
if atom(x) then
return repeat(x,times)
else
out = ""
for n = 1 to times do
out &= x
end for
return out
end if
end function
puts(1,repeat_string("ha",5) & '\n') -- hahahahaha
puts(1,repeat_string('*',5) & '\n') -- *****