首页 > 计算机等级考试
题目内容 (请给出正确答案)
[主观题]

1)#include < iostream >2)#include < cmath >3)using namespace std;4)double ma

1)#include< iostream >2)#include< cmath >3)using namespace std;4)double ma

1)#include< iostream >

2)#include< cmath >

3)using namespace std;

4)double max(double x,doubley)

5){

6)if(x>y)

7)return x;

8)else

9)return y;

10)}

11)int main()

12){

13)doublea,b,c;

14)cout<<" input two numbers:\n";

15)cin >>a >>b;

16)c=max(a,b);

17)cout<<" the squart of max imum="<< sqrt(c );

18)}

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

A.整型

B.单精度浮点型

C.双精度浮点型

D.字符型

查看答案
答案
收藏
如果结果不匹配,请 联系老师 获取答案
您可能会需要:
您的账号:,可能还需要:
您的账号:
发送账号密码至手机
发送
安装优题宝APP,拍照搜题省时又省心!
更多“1)#include 2)#include 3)using …”相关的问题
第1题
JSP的哪个指令允许页面使用者自定义标签库?()

A.Include指令1

B.Taglib指令

C.Include指令

D.Plugin指令

点击查看答案
第2题
下面程序的结果为【7】。 #include voidmain() { inta=1,b=2: boolc=1; if((a>b)‖C)cou

下面程序的结果为【7】。

#include

void main()

{

int a=1,b=2:

bool c=1;

if((a >b)‖C)cout<<”true”<

else

cout <<”false”<

}

点击查看答案
第3题
以下程序的执行结果是()。#include<iostream.h>#include<iomanip.h>void fun(int n){if(n!=0){fun

以下程序的执行结果是()。 #include<iostream.h> #include<iomanip.h> void fun(int n) { if(n!=0) { fun(n-1); for(int i=1; i<=n; i++) cout<<setw(3)<<i; cout<<end1; } } void main() { fun(3); }

A.0 0 1 0 1 2

B.1 1 2 1 2 3

C.1 2 2 3 3 3

D.1 2 3

点击查看答案
第4题
有以下程序#include<stdio.h>#include<string.h>main(){char x[]=“STRING”;x[0]=0;

有以下程序

#include<stdio.h>

#include<string.h>

main()

{char x[]=“STRING”;

x[0]=0;x[1]=’\0’;x[2]=’0’;

printf(”%d%d\n”,sizeof(x),strlen(x));

}

程序运行后的输出结果是()。

A.6 1

B.7 0

C.6 3

D.7 1

点击查看答案
第5题
有以下程序#include <stdio.h>#include <string.h>main(){ printf("%d\n",strlen (

有以下程序

#include <stdio.h>

#include <string.h>

main()

{ printf("%d\n",strlen ("ATS\n012\1") ); }

程序运行后的输出结果是

A)3

B)8

C)4

D)9

点击查看答案
第6题
有下列程序: #include<stdi0.h> voidmain() {chara=4; printf("%d\n",a=a<<1);

有下列程序: #include<stdi0.h> voidmain() {chara=4; printf("%d\n",a=a<<1); } 程序的运行结果是()。

A.40

B.16

C.8

D.4

点击查看答案
第7题
有以下程序#include <stdio.h>maain(){ int a=12,c; c=(a<<2)<<1; printf(”

有以下程序

#include <stdio.h>

maain()

{ int a=12,c;

c=(a<<2)<<1;

printf(”%d\n”,c);

}

程序运行后的输出结果是

A)3

B)50

C)2

D)96

点击查看答案
第8题
下面程序的运行结果是 #include<iostream.h> int fun(int a[ ] ,int n) { int result=1; for(in

下面程序的运行结果是

#include<iostream.h>

int fun(int a[ ] ,int n)

{

int result=1;

for(int i=1;i<n;i++)

result=result * a[i] ;

retum result;

}

void main()

{

int a[3] ={3,4,5};

cout

A.12

B.15

C.20

D.60

点击查看答案
第9题
以下程序的输出结果是()#include<stdio.h>main(){int a,b,d=241;a=d/100%9b=(-1)&&(1);

以下程序的输出结果是() #include<stdio.h> main() {int a,b, d=241; a=d/100%9 b=(-1)&&(1); printf("%d,%d,a,d");}

A.6,1

B.2,1

C.6,0

D.2,0

点击查看答案
第10题
以下程序的输出结果是()。#include<stdio.h>main(){int a=-1,b=1,k; if((a<0)&&! (b--

以下程序的输出结果是()。 #include <stdio.h> main() { int a=-1,b=1,k; if((a<0)&&! (b-- <=0)) printf("%d %d\n",a,b); else printf("%d %d\n",b,a); }

A.-1 1

B.0 1

C.1 0

D.0 0

点击查看答案
第11题
有如下程序:#include <iostream>using namespace std;Class x{protected: int a;public: x() {a=

有如下程序: #include <iostream> using namespace std; Class x { protected: int a; public: x() { a=1; } }; class x1 : virtual public x { public: x1() { a+=1; cout<<

A.1

B.123

C.242

D.244

点击查看答案
退出 登录/注册
发送账号至手机
密码将被重置
获取验证码
发送
温馨提示
该问题答案仅针对搜题卡用户开放,请点击购买搜题卡。
马上购买搜题卡
我已购买搜题卡, 登录账号 继续查看答案
重置密码
确认修改