- Declare A Boolean Variable Named Allvalid Read In An Input Value For Variable Numints Then Read Numints Integers From 1 (14.12 KiB) Viewed 24 times
Declare a Boolean variable named allValid. Read in an input value for variable numints. Then, read numints integers from
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am
Declare a Boolean variable named allValid. Read in an input value for variable numints. Then, read numints integers from
Declare a Boolean variable named allValid. Read in an input value for variable numints. Then, read numints integers from input. and output "All valid values' if none of the integers are in the range-100 to-10 inclusive. Otherwise, output "Invalid value(s) Ex: If the input is 2-55 10, the output is: Invalid value(s) 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 17 (1-100 25 1-10) { count- count+l; } } if (allValid) { cout << "All valid values" << endl; > else { cout << "Invalid value(s)" << endl; } return 0;