Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- void esraa()
- {
- ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
- #ifndef ONLINE_JUDGE
- freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
- #endif
- }
- int main(){
- //esraa();
- cout << "Enter two numbers " ;
- double a , b ;
- cin >> a >> b;
- cout << "Enter operation";
- char operation;
- cin >> operation;
- //cin >> a >> b >> operation;
- if(operation == '+') cout << "a + b = "<< a + b << '\n';
- else if(operation == '-') cout << "a - b = " << a - b << '\n';
- else if(operation == '/') cout << "a / b = " << a / b << '\n';
- else if(operation == '*') cout << "a * b = " << a * b << '\n';
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement