使用 math.h 或 cmath 头文件中的正弦函数,表达式 sin(30) 的结果类型为 double、值约为 0.5。
math.h
cmath
sin(30)
double
0.5
正确 √
错误 ×