fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int A;int B;char S;cin >> A >> S >> B;
  7. if (S == '+')
  8. {
  9. cout << A + B;
  10. }
  11. else if (S == '-')
  12. {
  13. cout << A - B;
  14. }
  15. else if (S == '*')
  16. {
  17. cout << A * B;
  18. }
  19. else if (S == '/')
  20. {
  21. cout << (A / B);
  22. }
  23. return 0;
  24. }
  25.  
Success #stdin #stdout 0s 5320KB
stdin
Standard input is empty
stdout
Standard output is empty