问题 单项选择题

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:\n";

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、整型

B、单精度浮点型

C、双精度浮点型

D、字符型

答案

参考答案:C

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

填空题
单项选择题