I want to know how to make an error handling for this code without using any class.
-
Would that be possible?
What I have tried:
#include <stdio.h>
int main()
{
int a;
int b;
int sum;
printf("Enter first number:");
scanf("%d", &a );
printf("Enter second number:");
scanf("%d", &b );
printf("The sum of:");
printf("%d", sum=a+b);
printf("The product of:");
printf("%d", sum=a*b);
printf("The quotient of:");
printf("%d", sum=a/b);
printf("The difference of:");
printf("%d", sum=a-b);
printf("The modulus of:");
printf("%d", sum=a%b);
return(0);
}