Advertisement
Rofyda_Elghadban1

Untitled

Dec 3rd, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3. #include <cmath>
  4. #include <algorithm>
  5.  
  6. using namespace std;
  7. void Rofyda_Elghadban(){
  8. #ifndef ONLINE_JUDGE
  9. freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  10. #endif
  11. }
  12.  
  13. int main()
  14. { Rofyda_Elghadban();
  15. long long a,b;
  16. char x;
  17. cin>>a>>x>>b;
  18. if('x'=="+"){
  19. cout<<(a+b)<<"\n";
  20. }
  21. else if('x'=="-"){
  22. cout<<(a-b)<<"\n";
  23. }
  24. else if('x'=="*"){
  25. cout<<(a*b)<<"\n";
  26. }
  27. else if('x'=="/"){
  28. cout<<(a/b)<<"\n";
  29. }
  30. return 0;
  31. }
  32.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement