Question PSC-LOOP-0031
EasyWhat will be printed by the following pseudocode?
Integer a = 0, b = 1, c
repeat 6 times
c = a + b
a = b
b = c
end repeat
Print b
- A.
21
- B.
8
- 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 a = 0, b = 1, c
repeat 6 times
c = a + b
a = b
b = c
end repeat
Print b
21
8
Sign up free to see the answer and a step-by-step explanation.
6
13