单项选择题
阅读下面的程序:
#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<iostream.h>...
下列程序的输出结果是 【13】 。 #in...
如果表达式x=y*z中的“*”是作为成员函...
已知递归函数f的定义如下: int f(int ...