#G7C01. G7-1 数学库函数 课后练习
G7-1 数学库函数 课后练习
- [G7-样题-1]如果下面代码输入整数为10,输出是1,则横线处填写?()。
#include <iostream>
#include <string>
#include <cmath>
using namespace std;
int main()
{
int x;
cin >> x;
cout << ________ << endl;
return 0;
}
{{ select(1) }}
- [G7-样题-7]定义double型常量pi=3.14和变量,代表等边三角形边长,则该三角形的面积是()。 {{ select(2) }}
- [G7-2312-1]定义变量,如果下面代码输入为100,输出最接近( )。
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
using namespace std;
int main()
{
double x;
cin >> x;
cout << log10(x) - log2(x) << endl;
cout << endl;
return 0;
}
{{ select(3) }}
- [G7-2403-8]已知为类型的变量,且值大于0,则下列表达式的值一定大于0的是( )。 {{ select(4) }}
- [G7-2406-1] 下列C++代码的输出结果是()。
#include <iostream>
#include <cmath>
using namespace std;
int main() {
cout << sin(3.1415926 / 2);
return 0;
}
{{ select(5) }}
- [G7-样题-16]定义变量,则为真。() {{ select(6) }}
- 正确
- 错误
- [G7-样题-17]假设和都是double型正数,如果说比大一个数量级,等于10。() {{ select(7) }}
- 正确
- 错误
- [G7-样题-18]如果double型变量代表锐角对应的弧度角,则可以编程来确定的近似区间。() {{ select(8) }}
- 正确
- 错误
- [G7-样题-19]返回的结果是浮点数。() {{ select(9) }}
- 正确
- 错误
- [G7-2312-16]小杨这学期准备参加GESP的7级考试,其中有关于三角函数的内容,他能够通过下面的代码找到结束循环的角度值。()
int main()
{
double x;
do{
cin >> x;
x=x/180*3.14;
}while((int)(sin(x)*sin(x)+cos(x)*cos(x)) == 1);
cout << "//" << sin(x) << " " << cos(x);
cout << endl;
return 0;
}
{{ select(10) }}
- 正确
- 错误