Simple calculator making project in C++.

sadat
0

#include <iostream>
using namespace std;
int main() {
int a,b,c;
cout<<"Enter first number"<<endl;
cin>> a ;
cout<<"Enter second number number"<<endl;
cin>> b;
cout<<"Enter operator"<<endl;
cin>> c;
switch
(c){
case 0 : cout<< "The sumetion is " <<endl;
break;
case 1: cout<<"The multiplication is "<<endl;
break;
case 2 : cout<<"The subtraction is "<<endl;
break;
case 3: cout<<"The division is "<<endl;
break;
default: cout<<"invalid input";

}

return 0;
}

Post a Comment

0Comments

Please Select Embedded Mode To show the Comment System.*