105k views
1 vote
Keep Asking User for Input Until Digit Entered C

A) while input != digit:
B) until input == digit:
C) do-while input != digit:
D) continue until input == digit:

1 Answer

4 votes

Final answer:

The correct option is A) while input != digit.

Step-by-step explanation:

The correct option in this case is A) while input != digit.

Option A uses a while loop to keep asking the user for input until the digit is entered. The condition 'input != digit' will continue the loop as long as the input is not equal to the digit.

This option is commonly used in programming to create repetition or iteration until a specific condition is met.

User Mahdi Ghafoorian
by
8.1k points