To determine how many additions are performed until a > b
, let's go through each step:
Step 1: A = 0, B = 9 (Initial values)
Step 2: Add 2 to A (A = A + 2) -> A = 2
Step 3: Check if A > B (2 > 9) -> False
Step 4: Add 2 to A (A = A + 2) -> A = 4
Step 5: Check if A > B (4 > 9) -> False
Step 6: Add 2 to A (A = A + 2) -> A = 6
Step 7: Check if A > B (6 > 9) -> False
Step 8: Add 2 to A (A = A + 2) -> A = 8
Step 9: Check if A > B (8 > 9) -> False
Step 10: Add 2 to A (A = A + 2) -> A = 10
Step 11: Check if A > B (10 > 9) -> True
The condition a > b
is satisfied after 5 additions (Step 2 to Step 11). Therefore, the correct answer is C) 5.