SHARE
TWEET

Untitled

a guest Mar 19th, 2019 51 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <math.h>
  3. #define pi 3.14
  4. using namespace std;
  5.  
  6. int main() {
  7.     float g, a;
  8.  
  9.     cout << "Enter a: ";
  10.     cin >> a;
  11.     cout << a << endl;
  12.  
  13.     if (a>pi) {
  14.         g=(1.0/3)*pow(a,2)-pow(a-pi*pi, 1.0/3);
  15.     }
  16.     else if (a==pi) {
  17.         g=pow(log(a+ (pi/3)+1), 3) + exp(a+pi);
  18.     }
  19.     else {
  20.         g=tan((a*pi)/6)-pow(sin((a*pi)/2),2);
  21.     }
  22.     cout << "g= " << g;
  23.     return 0;
  24. }
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