write a C program that works as the calculator which can operate with the four operations ( + - / * ) , the program should keep running and asks the user to end or continue use functions to create the calculator part ..
1- use if statements . with the upper operations
2- use functions to create the calculator part .
3- the program should keep running and asks the user to end or continue ..( use while statement )
#include<stdio.h>
#include<conio.h>
void add(int,int);
void subtract(int,int);
void divide(int,int);
void multiply(int,int);
void main()
{
int a,b,opt,ch;
printf("CALCULATOR");
printf("\n1.ADDITION");
printf("\n2.SUBTRACTION");
printf("\n3.DIVISION");
printf("\n4.MULTIPLICATION\n");
while(1)
{
printf("Enter first integer number:");
scanf("%d",&a);
printf("\nEnter second integer number:");
scanf("%d",&b);
printf("\nPlease Enter choice of Operation");
scanf("%d",&opt);
if(opt==1)
{
add(a,b);
}
else if(opt==2)
{
subtract(a,b);
}
else if(opt==3)
{
divide(a,b);
}
else if(opt==4)
{
multiply(a,b);
}
else
{
printf("Wrong choice\n");
}
printf("\nWant to continue (1/0):");
scanf("%d",&ch);
if(ch==0)
{
exit(0);
}
}
getch();
}
void add(int a,int b)
{
printf("%d",a+b);
}
void subtract(int a,int b)
{
printf("%d",a-b);
}
void divide(int a,int b)
{
if(b==0)
{
printf("Wrong value entered");
}
else
{
printf("%d",a/b);
}
}
void multiply(int a,int b)
{
printf("%d",a*b);
}

THE OUTPUT RUNS
FINE AND OUTPUT HAS BEEN VERIFIED
write a C program that works as the calculator which can operate with the four operations...