fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. void FastIO(){
  5.  
  6. ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  7. freopen("input.txt", "r", stdin), freopen("output.txt", "w", stdout);
  8. };
  9.  
  10.  
  11. int main(){
  12. FastIO();
  13. int a,b;
  14. char ch;
  15. cin>>a>>ch>>b;
  16. switch(ch)
  17. {
  18. case '+':
  19. cout<<a+b;
  20. break;
  21. case '-':
  22. cout<<a-b;
  23. break;
  24. case '*':
  25. cout<<a*b;
  26. break;
  27. case '/':
  28. cout<<a/b;
  29. break;
  30. }
  31. return 0;
  32. }
Success #stdin #stdout 0.01s 5284KB
stdin
4*5
stdout
Standard output is empty