| preferred AP College board partner for AP classes
medium Solved by 9 students
Infinite Loop Conditions
< Prev
Next >

Consider the following pseudocode with count initialized to 0:

REPEAT UNTIL (count > max)
 count ← count + step
 DISPLAY(count)

For which combination of values would this code result in an infinite loop?

A

max = -5, step = -1

B

max = 0, step = 0

C

max = 10, step = 2

D

max = 10, step = -1

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

Question Leaderboard

Rank
User
Correct Count
Attempt Count
Time
Score
#1manessa.hachem201122 0m 00s 200
#2bhavinidixit031111 0m 00s 100
#3ballsgaming21411 0m 44s 56
#4jjacobs12 1m 19s 11
#5soniahalepota200512 1m 36s -6
#6jdvillalta86513 2m 01s -41
#7mahmoudjibrin0813 2m 35s -75
#8tianbo.shen11 7m 59s -379
Items per page:
10
1 – 8 of 8
No comments yet. Be the first to comment!

AI Tutor

How can I help?

APFIVE © 2020.
Email: [email protected]|Privacy Policy