Are you taking CLEP classes? Try clep.ai
| preferred AP College board partner for AP classes
hard

Cyclomatic Complexity of Nested Conditionals

Mark
< Prev
Next >

The following code segment uses a nested conditional structure to determine a student’s academic status.

IF (credits >= 90)
IF (gpa >= 2.0)
status = “Senior in good standing”
ELSE
status = “Senior on probation”
ELSE IF (credits >= 60)
IF (gpa >= 2.0)
status = “Junior in good standing”
ELSE
status = “Junior on probation”

What is the cyclomatic complexity of this code segment?

A

4

B

6

C

5

D

3

Hint
Did You Know?
Explain Why
Explain All Answers
Check Answer
Show Correct Answer
Report Question

Question Leaderboard

Not enough data yet to show leaderboard.

AI Tutor

How can I help?

APFIVE © 2020.
Email: apfive@apfive.org|Privacy Policy|