#include <stdio.h>
#include <math.h>

int main()
{
    double degree, radian, sin_value;
    const double pi = 3.14159;

    printf("Enter the degree: ");
    scanf("%lf", &degree);

    radian = degree * pi / 180.0;
    sin_value = sin(radian);

    printf("The sin of %lf degree is %.2lf\n", degree, sin_value);

    return 0;
}
C语言计算角度的正弦值:使用sin()函数和弧度转换

原文地址: https://www.cveoy.top/t/topic/oJTv 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录