CHALLENGE 5.2.3: All values fit a category? ACTIVITY 406568.2561122.qx3zqy7 Jump to level 1 Declare a Boolean variable n
Posted: Tue Jul 12, 2022 8:22 am
CHALLENGE 5.2.3: All values fit a category? ACTIVITY 406568.2561122.qx3zqy7 Jump to level 1 Declare a Boolean variable named allMatch. Read in an input value for variable numInput. Then, read numinput integers from input, and output "All match" if all of the integers are in the range -10000 to -9000 inclusive. Otherwise, output "Value(s) out of range". Ex: If the input is 2-9500-8970, the output is: Value(s) out of range 1 #include <iostream> 2 using namespace std; 4 int main() { 5 int numInput; 6 7 9 10 11 12 13 14 15 16 17 /* Additional variable declarations go here */ /* Your code goes here */ if (allMatch) { cout << "All match" << endl; } else { cout << "Value(s) out of range" << endl; } 1 2 1 2