#include<stdio.h>
void calc();
int main(void)
{
calc();
}
void calc()
{
int a,b,c;
printf("1.sum\n2.difference\n3.product\n4.quotient\n5.remainder \n Enter the choice ..... ");
scanf("%d",&c);
printf("enter the no:s");
scanf("%d%d",&a,&b);
delay(1000);
if(c==1)
printf("sum=%d",a+b);
if(c==2)
printf("diffrence=%d",a-b);
if(c==3)
printf("product=%d",a*b);
if(c==4)
printf("quotient=%d",a/b);
if(c==5)
printf("remainder=%d",a%b);
}
void calc();
int main(void)
{
calc();
}
void calc()
{
int a,b,c;
printf("1.sum\n2.difference\n3.product\n4.quotient\n5.remainder \n Enter the choice ..... ");
scanf("%d",&c);
printf("enter the no:s");
scanf("%d%d",&a,&b);
delay(1000);
if(c==1)
printf("sum=%d",a+b);
if(c==2)
printf("diffrence=%d",a-b);
if(c==3)
printf("product=%d",a*b);
if(c==4)
printf("quotient=%d",a/b);
if(c==5)
printf("remainder=%d",a%b);
}
0 comments:
Post a Comment