Question PSC-LOOP-0072
HardWhat will be the output of the following pseudocode?
Integer n = 1000, c = 0
while (n >= 1)
n = n / 3
c = c + 1
end while
Print c
- A.
6
- B.
333
- 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 the output of the following pseudocode?
Integer n = 1000, c = 0
while (n >= 1)
n = n / 3
c = c + 1
end while
Print c
6
333
Sign up free to see the answer and a step-by-step explanation.
8
7