//this is a program to add, substrat, multiply and divide
#include<stdio.h>
#include<conio.h>
int add(int x, int y);
int sub(int x, int y);
int mult(int x, int y);
int div(int x, int y);
void main()
{
int num1, num2, ans;
printf("\n\nEnter Any two numbers: ");
scanf("%d%d",&num1,&num2);
ans=add(num1,num2);
printf("\n\nAddition=%d",ans);
ans=sub(num1,num2);
printf("\n\nSubstraction=%d",ans);
ans=mult(num1,num2);
printf("\n\nMultiplication=%d",ans);
ans=div(num1,num2);
printf("\n\nDivision=%d",ans);
getch();
}
int add(int x, int y)
{
return x+y;
}
int sub(int x, int y)
{
return x-y;
}
int mult(int x, int y)
{
return x*y;
}
int div(int x, int y)
{
return x/y;
}
#include<stdio.h>
#include<conio.h>
int add(int x, int y);
int sub(int x, int y);
int mult(int x, int y);
int div(int x, int y);
void main()
{
int num1, num2, ans;
printf("\n\nEnter Any two numbers: ");
scanf("%d%d",&num1,&num2);
ans=add(num1,num2);
printf("\n\nAddition=%d",ans);
ans=sub(num1,num2);
printf("\n\nSubstraction=%d",ans);
ans=mult(num1,num2);
printf("\n\nMultiplication=%d",ans);
ans=div(num1,num2);
printf("\n\nDivision=%d",ans);
getch();
}
int add(int x, int y)
{
return x+y;
}
int sub(int x, int y)
{
return x-y;
}
int mult(int x, int y)
{
return x*y;
}
int div(int x, int y)
{
return x/y;
}