Question: Input 100 please! (1) Read integer 100 from the keyboard. The program will keep asking for 100 if the user gives a different number (let's


Input 100 please! (1) Read integer 100 from the keyboard. The program will keep asking for 100 if the user gives a different number (let's assume only integers will be entered for now), e.g, Please enter 100: 99 I'm sorry, you must enter 100: 101 I'm sorry, you must enter 100: 100 Got 100! (2) Assume the user may enter non-integer characters like "abcd". (a) use the return value of scanf function to detect; and (b) call clearKeyboardBuffer( to remove the non-integer characters before reading new input Please enter 100: abcde I'm sorry, you must enter 100: ok I'm sorry, you must enter 100: 100 Got 100! 5 #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
