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