Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

< Code by C++ language > i have a problem with using C++ language . That is : de

ID: 3621061 • Letter: #

Question

< Code by C++ language >

i have a problem with using C++ language .
That is :
design a function to check input :
1) Input must be digit
2) If not , print : "Error , try again"

So, should be careful with some case :
_ input is start with : number then character --> error
_ input is start with : character then number --> error
_ in put is start with : just character --> error
In other case , if input order that must be between number and number , if out of range --> error.

In at least, after function succeed , we have a true digit , accepted all of orders.

Thank you so much if you can explain it so easy for me because i'm just starting with C++.

Explanation / Answer

#include int main() { int num; cout > num; while (1) { if (!cin.fail()) { { cout
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote