A C program to find all arithmatic operations using function

#include<stdio.h>
int sum(int a,int b)
{
int sum;
sum=a+b;
return sum;
}



int sub(int c,int d)
{
int sub;
sub=c-d;
return sub;
}
int mul(int e,int f)
{
int mul;
mul=e*f;
return mul;
}
int div(int g,int h)
{
int div;
div=g/h;
retuen div;
}
void main()
int x,y,addition,subtraction,multiplication,division;
printf("enter two number");
scanf("%d%d",&x,&y);
addition=sum(x,y);
printf("the sum of two number is %d",addition);
subtraction=sub(x,y);
printf("the difference of two number is %d",subtraction);
multiplication=mul(x,y);
printf("the multiplication of two number is %d",multiplication);
division=div(x,y);
printf("the division of two number is %d",division);
getch();
clrscr();
}

Comments

Popular posts from this blog

Visti Cloud Service (VCS)

Being a DARK SKINNED is not a PROBLEM