Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- using namespace std;
- int main() {
- double x, y;
- cin >> x >> y;
- if (x>M_PI_2 && y>M_PI_2)
- cout << sin(x)+cos(y) << endl;
- else if (x<(-M_PI_2) && y <(-M_PI_2))
- cout << sin(y) << endl;
- else if ((-M_PI_2)<=x && x<=M_PI_2 && (-M_PI_2)<=y && y<=M_PI_2 )
- cout << x+y << endl;
- else
- cout << "Error input" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement