?

Free Version

Upgrade subject to access all content

Moderate

Consecutive if Statements

APCSA-UEFYUD

Consider the following code segment.

 if (angle > 5)
  angle = angle + 5;
 if (angle > 10)
  angle = angle + 10;

If angle is initialized to 10, what is the value of angle after executing this code segment?

A

10

B

15

C

20

D

25

E

30