Question: Write a C program that uses a while loop. There are three inputs: num1, char1, and num2. The c program should prompt the user to

Write a C program that uses a while loop. There are three inputs: num1, char1, and num2.

The c program should prompt the user to enter a number a char and another number. This should be done using one scanf statement.

If either num1 or num2 are greater than 255 or less than 0, the program should prompt them to enter the numbers again until they enter correct ones.

Output:

enter the expression: //i entered 2 u 3 //the program accepts this with one scanf.

These numbers are valid.

enter the expression: //i entered 72722 u 7 //the program accepts this with one scanf. //since num1 is greater than 255, the program will prompt them to enter the expression again.

enter the expression:

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!