//弧度转化角度:弧度*180/PI //角度转化弧度:角度*PI/180 #include <math.h> #include <stdio.h> const double PI=acos(-1.0); //sin传入的参数的是弧度 void main() { int z=30; double x = 10.0, y = 10.0; double result; //sin30结果 printf("sin(%d)=%.2lf ",z,sin(2*PI*z/360.0)); result=atan2(y, x); //结果返回是弧度 printf("The arc tangent ratio of %lf is %.1lf ", (y / x), result*180/PI); //sin45的结果 printf("sin(%.0f)=%.2lf ",result*180/PI,sin(result)); //注意不要用%d }