1)#include
2)using namespace std;
3)int main()
4){
5)int a,b,result;
6)cout<<"please input two numbers:"; 7)cin>>a>>b;
8)result=3*a-2*b+1;
9)cout<<"resultis
程序第5行中,”
”的含义是:()
A. 代表’’和’n’两个字符
B. 回车,即回到当前行的行首
C. 回车换行,即回到下一行首列
D. 制表符
第1题
2)using namespace std;
3)int main()
4){
5)int a,b,result;
6)cout<<"please input two numbers:\n";
7)cin>>a>>b;
8)result=3*a-2*b+1;
9)cout<<"resultis"<< result<< endl;
10)}
程序的第5行中的cout表示:()
A、显示字符串
B、标准输出的流设备
C、标准输入的流设备
D、程序入口
第2题
A.运行后报错
B.66
C.6 12
D.5 5
第3题
A.1
B.4
C.5
D.2
第4题
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:"; 15)cin >>a >>b;
16)c=max(a,b);
17)cout<<" the squart of max imum="<< sqrt( c ); 18)}
执行完第14行后,命令提示符窗口中输出的结果是:()
第5题
A.1
B.4
C.5
D.2
第6题
#include<iostream>
using namespace std;
int main(){
int f, f1=0, f2=1;
for(int i=3; i<=6; i++) {
f=f1+f2;
f1=f2; f2=f;
}
cout<<f<<end1;
return 0;
}
运行时的输出结果是( )。
A) 2
B) 3
C) 5
D) 8
A.
B.
C.
D.
第7题
include <iostream>
using namespace std;
int main()
{
int m[5],n[5],*px,*py,k;
px=m;
py=n;
for(k=1;k<4;k++)
{
*px=k;
*py=2*k;
cout<<m[k-1]<<n[k-1];
px++;py++;
}
cout<<end1;
return 0;
}
运行后的输出结果为【 】。
第8题
A.50 53 56
B.49 52 55
C.2 5 8
D.1 4 7
第9题
A.12
B.4
C.15
D.13
第10题
A.2
B.3
C.5
D.8
为了保护您的账号安全,请在“上学吧”公众号进行验证,点击“官网服务”-“账号验证”后输入验证码“”完成验证,验证成功后方可继续查看答案!