fork download
  1. #include <iostream>
  2.  
  3.  
  4. using namespace std;
  5.  
  6. int a ,b;
  7. int ile=1;
  8. char co;
  9.  
  10. int main()
  11. {
  12. while(ile<5)
  13. {
  14. cin>>co;
  15. cin >>a>>b;
  16. ile++;
  17. }
  18. switch(co)
  19. {
  20. case '+': cout << a+b<<endl;
  21. break;
  22. case '-': cout <<a-b<<endl;
  23. break;
  24. case '*': cout <<a*b<<endl;
  25. break;
  26. case '/': cout <<a/b<<endl;
  27. break;
  28. case '%': cout<< a%b<<endl;
  29. break;
  30.  
  31.  
  32. }
  33. return 0;
  34. }
  35.  
Success #stdin #stdout 0s 3460KB
stdin
Standard input is empty
stdout
Standard output is empty