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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started