Question PSC-LOOP-0044
MediumWhat will be printed by the following pseudocode?
Integer s = 0, i = 1
while (i <= 100)
s = s + i
i = i * 3
end while
Print s
- A.
40
- B.
364
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Loops question
What will be printed by the following pseudocode?
Integer s = 0, i = 1
while (i <= 100)
s = s + i
i = i * 3
end while
Print s
40
364
Sign up free to see the answer and a step-by-step explanation.
81
121