#include<stdio.h>
#include<stdlib.h> #define pi 3.141592 void conver_radian(float radian)
{
int degree,minute,second;
float angle,min,sec; angle = radian * / pi;
degree = (int)angle; min = (angle - degree)*;
minute = (int)min; sec = (min - minute)*;
second = (int) (sec + 0.5); //四舍五入 printf("%f弧度等于%d度 %d分 %d秒\n",radian,degree,minute,second);
} void main()
{
//将弧度值转换为角度值
float radian; printf("请输入弧度值:");
scanf("%f",&radian); conver_radian(radian); system("pause");
return ;
}