c programming

chhotu shaw



write a program to demonstrate arithmetic operations.

#include<stdio.h>
#include<conio.h>
void main()
{
 int add,sub,mul,mod,a,b;
float div;
clrscr();
printf("enter the two number:");
scanf("%d%d",&a,&b);
add=a+b;
printf("add=%d",add);
sub=a-b;
printf("sub=%d",sub);
mul=a*b;
printf("mul=%d",mul);
div=a/b;
printf("div=%f",div);
mod=a%b;
printf("mod=%d",mod);
getch();
}


Comments

Post a Comment

Popular Posts