Program
#include <stdio.h>
int main()
{
int a, b, sum, diff, mul, quo, rem;
printf("**********************************************");
printf("\n**********************************************");
printf("\n** WAP to do basic calculations **");
printf("\n** Created by Sheetal Garg **");
printf("\n** Assistant Professor **");
printf("\n** Phone No:9467863365 **");
printf("\n**********************************************");
printf("\n**********************************************");
printf("\nEnter two numbers a and b");
scanf("%d%d",&a,&b);
sum=a+b;
diff=a-b;
mul=a*b;
quo=a/b;
rem=a%b;
printf("\nthe value of sum is %d", sum);
printf("\nthe value of difference is %d", diff);
printf("\nthe value of multiplication is %d", mul);
printf("\nthe value of quotient (when a divided by b) is %d", quo);
printf("\nthe value of remainder (when a divided by b) is %d", rem);
return 0;
}
Output
********************************************** ********************************************** ** WAP to do basic calculations ** ** Created by Sheetal Garg ** ** Assistant Professor ** ** Phone No:9467863365 ** ********************************************** ********************************************** Enter two numbers a and b 5 3 the value of sum is 8 the value of difference is 2 the value of multiplication is 15 the value of quotient (when a divided by b) is 1 the value of remainder (when a divided by b) is 2