Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
18
Task/Repeat-a-string/OxygenBasic/repeat-a-string.basic
Normal file
18
Task/Repeat-a-string/OxygenBasic/repeat-a-string.basic
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
'REPEATING A CHARACTER
|
||||
|
||||
print string 10,"A" 'result AAAAAAAAAA
|
||||
|
||||
'REPEATING A STRING
|
||||
|
||||
function RepeatString(string s,sys n) as string
|
||||
sys i, le=len s
|
||||
if le=0 then exit function
|
||||
n*=le
|
||||
function=nuls n
|
||||
'
|
||||
for i=1 to n step le
|
||||
mid function,i,s
|
||||
next
|
||||
end function
|
||||
|
||||
print RepeatString "ABC",3 'result ABCABCABC
|
||||
Loading…
Add table
Add a link
Reference in a new issue