Monday, 7 April 2014

Program of arithmatic operator

#include<stdio.h>
main()
{
     int a,b,sum,dif,mul,div;
     printf("\nEnter two numbers=");
     scanf("%d%d",&a,&b);
     sum=a+b;
     printf("\nThe sum of %d and %d is %d",a,b,sum);
     dif=a-b;
     printf("\nThe difference of %d and %d is %d",a,b,dif);
     mul=a*b;
     printf("\nThe product of %d and %d is %d",a,b,mul);
     div=a/b;
     printf("\nThe division of %d and %d is %d",a,b,div);
}

No comments:

Post a Comment