Write an exception-controlled loop that loops until the user enters an integer between 1 and 5.?
Prepare an exception-controlled picture that loops until the consumer enters a integer somewhere between 1 and also 5.
Thanks
Hmmm
enter in thingy
thingy= reader
while((thingy5)
enter in thingy
thingy=reader.
the important thingy would be to have TWO readings, 1 before the loop and 1 after
Are people sure which that’s what you look for If a person insist about using exceptions then you certainly can also code your as in addition to extension with the exception class or toss an exemption.
What that you’re describing is absolutely input validation.Checking that the number is due to a good range just isn’t usually handled with conditions.
Leave a Reply
You must be logged in to post a comment.