Advertisement
Guest User

Untitled

a guest
Dec 8th, 2019
123
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. using namespace std;
  4.  
  5. int main() {
  6. double x, y;
  7. cin >> x >> y;
  8. if (x>M_PI_2 && y>M_PI_2)
  9. cout << sin(x)+cos(y) << endl;
  10. else if (x<(-M_PI_2) && y <(-M_PI_2))
  11. cout << sin(y) << endl;
  12. else if ((-M_PI_2)<=x && x<=M_PI_2 && (-M_PI_2)<=y && y<=M_PI_2 )
  13. cout << x+y << endl;
  14. else
  15. cout << "Error input" << endl;
  16. return 0;
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement