弧度制转化

问题及代码:

定义参数宏AngleToRadian(degree,minute,second),将度(degree)、分(minute)、秒(second)转换为弧度。(#define PI 3.14159

代码:

#include 
#define PI 3.14159
#define AngleToRadian(degree,minute,second)  (degree+minute/60+second/3600)/180*PI
int main()
 {

     double degree,minute,second;
     scanf("%lf %lf %lf",°ree,&minute,&second);
     printf("%f",AngleToRadian(degree,minute,second));
     return 0;
 }

运行结果:

弧度制转化_第1张图片



你可能感兴趣的:(弧度制转化)