SHARE
TWEET

Untitled

a guest Dec 8th, 2019 75 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top