Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
77
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. #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. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement