想用c写一个和三角函数有关的程序

我在写一篇高中数学相关的论文的时候,提出了一条和三角函数相关的4变量公式
我想用C语言写一个简单的程序代替人工手算
这条公式是这样的:
θ=arccos(cosαcosβ+sinαsinβcosγ)
我希望输入一组α,β,γ的值,程序能输出θ
可以帮我用C/C++实现吗?

这种小计算用python写非常简单。c的格式有点烦

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

int theta(float a,float b,float c){
    return acos(cos(a)*cos(b)+sin(a)*sin(b)*cos(c));
}

int main(void)
{
    float a,b,c;
    float pi = 3.1415926; 
    a = pi/4;
    b = pi/3;
    c = pi/6;
    printf( "theta = %f" , theta(a,b,c));
    
    return 0;
}

http://t.csdn.cn/AZISv
看看