Question: Question Goal: Learn how to use sentinels in while loops to control when to exit. Assignment: Write a program that takes as input numbers from

Question
Goal: Learn how to use sentinels in while loops to control when to exit.
Assignment: Write a program that takes as input numbers from the user until they write stop and displays how many
even numbers were provided. Only numbers that fall between 0 and 100(inclusive) should be accepted. Also, at least one
number should be provided. If a number is not accepted, print "Only numbers between 0 and 100 are accepted." If stop
is written before any number is provided, do not terminate the loop and print "At least one accepted number must be
provided."
Note: The percentage should be printed with decimal places.
Question Goal: Learn how to use sentinels in

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!