当前位置:计算机科学技术题库>CPP考试题库

问题:

[单选]

1)#include < iostream >
2)# include < math.h >
3)using namespace std;
4)double max(double x,doubley);
5)void main()
6){
7)double   a,b,c;
8)cout << " input two numbers: ";
9)cin>>a>>b;
10)c=max(a,b);
11)cout<< " the squart of max imum="<< sqrt(c);
12)}
13)double max(doublex,doubley)
14){
15)if(x>y)
16)returnx;
17)else
18)returny;
19)}

程序第7行中变量a、b、c的类型是:()

A . A、整型
B . B、单精度浮点型
C . C、双精度浮点型
D . D、字符型

1)#include < iostream > 2)# include < math.h > 3)using namespace std; 4)double max(double x,doubley); 5)void main() 6){ 7)double   a,b,c; 8)cout >a>>b; 10)c=max(a,b); 11)cout A.0。 1。 变量不存在。 随机值。 概率大小在0和1之间的事件是()。 不可能发生的事件。 小概率事件。 必然发生的事件。 随机事件。 极可能发生事件。 《考规》中规定的检验员的职责是什么? 我省农信的客户可以通过()申请签约成为专业版网上银行个人客户。 A、农行借记卡。 B、福万通贷记卡。 C、本行定期存单。 D、福万通借记卡。 安排高血压患者饮食,正确的是() 限制食盐,适当补钾。 限制热量。 增加钙的摄入。 限酒。 以上都对。

1)#include < iostream >
2)# include < math.h >
3)using namespace std;
4)double max(double x,doubley);
5)void main()
6){
7)double   a,b,c;
8)cout << " input two numbers: ";
9)cin>>a>>b;
10)c=max(a,b);
11)cout<< " the squart of max imum="<< sqrt(c);
12)}
13)double max(doublex,doubley)
14){
15)if(x>y)
16)returnx;
17)else
18)returny;
19)}

程序第7行中变量a、b、c的类型是:()
参考答案:

  参考解析

程序在第7行定义了a,b,c三个double类型的变量,即双精度浮点型。

在线 客服