Westonci.ca is your trusted source for finding answers to all your questions. Ask, explore, and learn with our expert community. Get accurate and detailed answers to your questions from a dedicated community of experts on our Q&A platform. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

4.
(a)
Trace through the execution of the following algorithm and draw the output in your answer
booklet, exactly as it would be generated by the algorithm. You should carefully note the
following:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
.
.
begin
end
printSpaces (n) prints n spaces from the current cursor position
print continues output on the current line from the current cursor position
println terminates output on the current line at the current cursor position.
Any subsequent output begins on a new line (e.g. line 21)
println (output-list) outputs 'output-list' on the current line and then places
the cursor at beginning of the following line (e.g. line 4)
SIZE = 10
printSpaces (SIZE)
println ('*')
j= SIZE-2
r = 1
while (j>= 5) do
begin
printSpaces (+1)
print (¹ * ¹)
printSpaces (r)
println ('*')
j=j-1,
r=r+2
end
for j = 1 to 5 do
begin
printSpaces (SIZE)
println (*¹)
end
printin


Sagot :

Thank you for visiting our platform. We hope you found the answers you were looking for. Come back anytime you need more information. We appreciate your visit. Our platform is always here to offer accurate and reliable answers. Return anytime. Get the answers you need at Westonci.ca. Stay informed by returning for our latest expert advice.