Observe the following flowchart and find the output.

2023

Observe the following flowchart and find the output.

{5B7EA634-9D2C-411B-B597-6652AC13308C}.png
  1. A.

    180

  2. B.

    120

  3. C.

    100

  4. D.

    160

Attempted by 361 students.

Show answer & explanation

Correct answer: A

Initially A = 100, S = 0 . While A ≥ 20 , add A to S and reduce A by 40 . Values added to S are 100, 60, 20 → S = 180 .

A video solution is available for this question — log in and enroll to watch it.

Explore the full course: Uppsc Polytechnic Lecturer 2025 Cs