Jump to content

Repeat a string: Difference between revisions

(Added BBC BASIC)
Line 73:
Output .= String
Return Output
}</lang>
=={{header|AWK}}==
<lang awk>function repeat( str, n, rep, i )
{
for( ; i<n; i++ )
rep = rep str
return rep
}
 
BEGIN {
print repeat( "ha", 5 )
}</lang>
 
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.