How many times will the loop be executed in the following flowchart?
2022
How many times will the loop be executed in the following flowchart?

Answer: C. 2 — Initial value: X = 80 Check X > 0 → True → Print 80 → X = 80 − 40 = 40 Check X > 0 → True → Print 40 → X = 40 − 40 = 0 Check X > 0 → False → Loop stops So,…
- A.
80
- B.
1
- C.
2
- D.
3
Attempted by 416 students.
Show answer & explanation
Correct answer: C
Initial value: X = 80
Check X > 0 → True → Print 80 → X = 80 − 40 = 40
Check X > 0 → True → Print 40 → X = 40 − 40 = 0
Check X > 0 → False → Loop stops
So, the loop executes 2 times .
A video solution is available for this question — log in and enroll to watch it.
Loading lesson…