单项选择题
阅读下面的程序:
#include<iostream.h>
void main()
int x;
cin>>x;
if(x++>5)
cout<<x<<endl;
else
cout<<x——<<endl;
如果两次执行上述程序,且键盘输入分别为4和6,则输出结果分别是( )。
A.4,6
B.3,6
C.4,7
D.5,7
点击查看答案
<上一题
目录
下一题>
热门
试题
单项选择题
假定n=3,,下列程序的运行结果是( )。 #include<iostream.h> int Fun(int m) void main() cout<< Please input a number: ; int n,s=0; cin>>n; s=Fun(n); cout<<s<<endl; int Fun(int m) iht p=1,s=0; for (int I=1;I<=m;I++) p*=I; S+=p; return s;
A.7
B.9
C.8
D.10
点击查看答案
单项选择题
如果一个模板声明列出了多个参数,则每个参数之间必须使用逗号隔开,每个参数都必须使用( )关键字来修饰。
A.const
B.static
C.void
D.class
点击查看答案
相关试题
以下程序的输出结果是( )。 #include...
若有如下类定义: class B void funl(...
有以下类定义。 class MyClass private...
有如下程序 #include<iostream> using...