Question: 4.3.4: While loops with numbers. Read integers from input until an integer is read that is not in the range -40 to 35, both exclusive.

4.3.4: While loops with numbers.

Read integers from input until an integer is read that is not in the range -40 to 35, both exclusive. For each integer read that is in the given range, output the integer followed by " is accepted". Then, output the integer read that causes the reading to stop followed by " is rejected". End each output with a newline.

Ex: If the input is -36 -30 -50 -33 -32 -37 -34, then the output is:

-36 is accepted

-30 is accepted

-50 is rejected

#include using namespace std;

int main() { int inputData;

/* Your code goes here */

return 0; }

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 Databases Questions!