Computer Science, asked by bharathtg2225, 11 months ago

21 What will be the output of the following pseudocode?
1. Integer p, q, r, s
2. Set p = 15, q = 0, r = 60, S = 0
while((r MOQ P) EQUALS 0)
s = (s+2)*2
q = q + p
while (s < 50)
Print s
q = q -1
s = s + 9
end while
p = p - 3
12. end while
13. Print ​

Answers

Answered by lntg
20

Set p = 15, q = 0, r = 60, S = 0

while((r MOQ P) EQUALS 0)

s = (s+2)*2

q = q + p

while (s < 50)

Print s

q = q -1

s = s + 9

end while

p = p - 3

Answered by SaurabhJacob
0

The output is,

4

13

22

31

40

49

9 21 60 120

The Last line is showing the final print statement at the end which is line number thirteen.

The output above that line is by the print statement inside the while loop.

Similar questions