fork(3) download
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int32_t a,b;
  5. char wybor;
  6.  
  7. int main()
  8. {
  9. for(;;)
  10. {
  11. cin>>wybor>>a>>b;
  12.  
  13. switch(wybor)
  14. {
  15. case '+':cout<<a+b<<endl;break;
  16. case '-':cout<<a-b<<endl;break;
  17. case '*':cout<<a*b<<endl;break;
  18. case '/':cout<<a/b<<endl;break;
  19. case '%':cout<<a%b<<endl;break;
  20. }
  21.  
  22.  
  23. }
  24.  
  25. return 0;
  26. }
  27.  
Time limit exceeded #stdin #stdout 5s 4236KB
stdin
Standard input is empty
stdout
Standard output is empty