Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- int a;
- int b;
- int e;
- cin>>a;
- cin>>b;
- cin>>e;
- char c;
- cin>>c;
- if(c=='+'){
- e = a+b;
- }else{
- if(c=='-'){
- e = a-b;
- }else{
- if(c == '*'){
- e = a * b;
- }else{
- if (c == '/'){
- e = a / b;
- }
- }
- }
- }
- cout<<e;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement