1 条题解
-
0
C++ :
#include <iostream> #include <cmath> using namespace std; // 使用标准命名空间 int main() { double angle_degrees = 60.0; double angle_radians = angle_degrees * M_PI / 180.0; double sin_value = sin(angle_radians); // 计算正弦值 double cos_value = cos(angle_radians); // 计算余弦值 cout << "Angle in degrees: " << angle_degrees << endl; cout << "Angle in radians: " << angle_radians << endl; cout << "Sine value: " << sin_value << endl; cout << "Cosine value: " << cos_value << endl; return 0; }
- 1
信息
- ID
- 757
- 时间
- 1000ms
- 内存
- 128MiB
- 难度
- (无)
- 标签
- 递交数
- 0
- 已通过
- 0
- 上传者