When re-prompting on input failure, a loop should be used.

CMPTR
3rd Edition
ISBN:9781337681872
Author:PINARD
Publisher:PINARD
Chapter14: Working With Formulas And Functions
Section: Chapter Questions
Problem 12QY
icon
Related questions
Question
When re-prompting on input failure, a
loop should be used.
Transcribed Image Text:When re-prompting on input failure, a loop should be used.
Expert Solution
Step 1

A)

Counter-controlled loop

The loops in which a number of the iteration are definite or known to the user before executing the loop. The counter is a control variable that is initialized before loop starts and controls the loop. For example, input exactly 5 integers using a while loop.

End-of-file controlled 

It means data will be kept on processing until and unless there is no data in the file or the file is empty or reaches the end of the file.

Sentinel controlled

The number of iterations is in-definite and data will be kept on processing unless the user entered a special value which indicates that the loop must stop. For example, input certain integers until a special value selected by the user which is an illegal value has been entered.

The correct option is c. Sentinel controlled

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Troubleshooting
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
CMPTR
CMPTR
Computer Science
ISBN:
9781337681872
Author:
PINARD
Publisher:
Cengage
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage