C CODE(RUNS ON TURBO C++):
#include<stdio.h>
#include<conio.h>
//int c;
int sum(int a,int b)
{
return a+b;
}
int sub(int a, int b)
{
return a-b;
}
int mul(int a,int b)
{
return a*b;
}
float div(int a,int b)
{
return a/b;
}
void main()
{
int a,b;
clrscr();
printf("enter number for operations\n");
scanf("%d%d",&a,&b);
printf("\naddition of enter numbers is =%d",sum(a,b));
printf("\nsubtraction of enter numbers is =%d",sub(a,b));
printf("\nmultiplication of enter numbers is =%d",mul(a,b));
printf("\ndivision of enter numbers is =%f",div(a,b));
getch();
}
0 Comments
if you have any doubt, plz let me know