C语言计算角度的正弦值:使用sin()函数和弧度转换
#include <stdio.h>
#include <math.h>
int main()
{
double degree, radian, sin_value;
const double pi = 3.14159;
printf("Enter the degree: ");
scanf("%lf", °ree);
radian = degree * pi / 180.0;
sin_value = sin(radian);
printf("The sin of %lf degree is %.2lf\n", degree, sin_value);
return 0;
}
原文地址: https://www.cveoy.top/t/topic/oJTv 著作权归作者所有。请勿转载和采集!