#include<stdio.h>
#include<math.h>
#define PI 3.14
int main3()
{
//根据 1°=角度*PI/180° ==》推出 30°= 30°*PI/180=PI/6
int x=30;
double y;
if (x < -PI / 2)
{
y = 2 * pow(x, 3) + 3 * cos(x * PI / 180) + 5;
}
else if (x > -PI / 2 && x < PI / 2)
{
y = pow((x - 1) / (x - 3), 3) + 5 * x;
}
else
y = pow(x + sin(3 * x * PI / 180), 1 / 2);
printf("y = %0.2f",y);
return 0;
}