procedure printBar ( symbol : string, repetitions : int )
for count : 1 .. repetitions
put symbol .. % on the same line
end for
put "" % add a return at the end of the line
end printBar
%%%%%%%%%%%%%% Main Program %%%%%%%%%%%%%%%%%%
var symbol : string
var repetitions : int
put "What symbol would you like to output? " ..
get symbol
put "How many times do you want to repeat the symbol? " ..
get repetitions
printBar ( symbol, repetitions )
Comments (0)
You don't have permission to comment on this page.