Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main() {
- double input1, input2;
- while (true) {
- printf("Input two numbers between 0 and 127.\n");
- printf("Input 1:");
- scanf(%f, input1);
- printf("\nInput 2:");
- scanf(%f, input2);
- if (input1 >= 0 && input1 <= 127 &&
- input2 >0 && input2 <= 127)
- break;
- else
- printf("Your input values are invalid. Try again.\n\n");
- }
- // STUFF
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement