Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <math.h>
- #define pi 3.14
- using namespace std;
- int main() {
- float g, a;
- cout << "Enter a: ";
- cin >> a;
- cout << a << endl;
- if (a>pi) {
- g=(1.0/3)*pow(a,2)-pow(a-pi*pi, 1.0/3);
- }
- else if (a==pi) {
- g=pow(log(a+ (pi/3)+1), 3) + exp(a+pi);
- }
- else {
- g=tan((a*pi)/6)-pow(sin((a*pi)/2),2);
- }
- cout << "g= " << g;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement