Consider the following simple C program.
//C test #include int main() { int a, b, c; printf(\"Enter two numbers to add\\n\"); scan
You can use like:
if( scanf("%d%d",&a,&b) == 2) { //two integer values has been read successfully //do your stuff here } else { //Wrong input }