- Program :
#include<conio.h>
void main()
{
int a,b,c,d,e,f,g;
clrscr();
printf("\n----------------ARITHMETIC OPERATORS----------------");
printf("\nEnter A and B values:");
scanf("%d%d",&a,&b);
printf("\n----------------ARITHMETIC OPERATOR(+)----------------");
c=a+b;
printf("\nSum is : %d",c);
printf("\n----------------ARITHMETIC OPERATOR(-)----------------");
d=a-b;
printf("\nDifference is : %d",d);
printf("\n----------------ARITHMETIC OPERATOR(*)----------------");
e=a*b;
printf("\nMultiply is : %d",e);
printf("\n----------------ARITHMETIC OPERATOR(/)----------------");
f=a/b;
printf("\nDivision is : %d",f);
printf("\n----------------ARITHMETIC OPERATORS(%)----------------");
g=a%b;
printf("\nModulo is : %d",g);
getch();
}
- Output :
No comments:
Post a Comment