单选题 适中
#21052

下列C++代码的输出结果是( )。 # include <iostream> # include <cmath> using namespace std ; i…

下列C++代码的输出结果是( )。

#include <iostream>
#include <cmath>
using namespace std;
int main() {
	cout << sin(3.1415926 / 2);
	return 0;
}
未登录也能判分,登录后才会记录
答案与解析
正确答案:B
解析

计算机中的三角函数使用的是弧度,3.1415926可以看作Π,也就是求sin(Π/2)=1.