Question: Determine if a number is within a specified range. a) Request an integer number that is b) Validate the input value: 1) Positive 2) Less
Determine if a number is within a specified range. a) Request an integer number that is b) Validate the input value: 1) Positive 2) Less than 7 or greater than 11 1) If the input is in the range, output Input is valid.. 2) If the input is invalid, output Invalid input.". 3) Repeat the input request until a valid input is entered and count the total loop iteration (s). Example Outputl: Enter a positive number that is less t Invalid input. han 7 or greater than 11: -1 Enter a positive number Invali input. that is less than 7 or greater than 11: 10 Enter a positive number that is less than 7 or greater than 11: 6 Input is valid. Loop Iteration(s)3 Example Output 2 Enter a positive number that is less than 7 or greater than 11:0 Invalid input. Enter a positive number that is less than 7 or greater than 11:7 Invalid input. Enter a positive number that is less than 7 or greater than 11: 8 Invalid input. Enter a positive number that is less than 7 or greater than 11: 71:1 Input is valid. Loop Iteration (s) 4 J. Sun Introduction to C++ Programming Design and Implementation
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
