RareComputer science
What value of D does the flowchart output for A = 11, B = 10, C = 12?
Short answer
100
Exercise

Solution
11 > 10 ✓ → 10 > 12 × → D = 10² = 100
Begin at the first decision. Eleven exceeds ten, so the branch asks whether ten exceeds twelve. This second answer is false, leading to the instruction that squares B. A and C select the route; neither contributes a factor to the multiplication.
A = 11, B = 10, C = 12. (A > B) = (11 > 10) = 1. (B > C) = (10 > 12) = 0. D = B × B = 10 × 10.
Trace the instructions in order. A test reads the current values, an assignment replaces a value, and output uses the value present when execution reaches it. Recording each new state makes the result checkable.
Platforms
- MAXIMUM
