Program for Calculator of arithmetic operation:
#include <iostream>
#include <conio.h>
using namespace std;
int main()
{char operation;
int a,b;
cout<<"Enter first Number: ";
cin>>a;
cout<<"Enter second Number: ";
cin>>b;
cout<<"Enter an operation arithmetic operation do you
want: ";
cin>>operation;
switch (operation)
{
case '+' :
cout<<"The Addition of numbers= "<<a+b;
break;
case '-':
cout<<" The Subtraction of numbers= "<<a-b;
break;
case '*':
cout<<"The Multiplication of numbers= "<<a*b;
break;
case '/':
cout<<"The Division of numbers= "<<a/b<<endl;
break;
}
getche
();
return 0;
0 comments:
Post a Comment