Source Code
#include<iostream>#include<conio.h>
using namespace std;
void calculator(float a, float b){
cout<<"Enter any two value:"<<endl;
cin>>a>>b; //geting input from user
cout<<"Sum is : "<<a+b<<endl;//sum operation
cout<<"Subtraction is:"<<a-b<<endl;//sub operation
cout<<"Multiplication is :"<<a*b<<endl;//multly operation
cout<<"Division is : "<<a/b<<endl;
}
int main(){
float a,b;
calculator(a,b);
calculator(a,b);
getche();
}
No comments: