有以下程序:
#include<iostream>
using namespace std;
int main( )
{
int x=15;
while(x>10&&x<50)
{
x + +;
if(x/3)
{
x++; break;
}
}
cout<<x<<endl;
return 0;
}
执行后的输出结果是
A.15
B.16
C.17
D.18
[单选题]有以下程序include using namespace std;int a;int fun ();int main (){extern int a有以下程序#include <iostream>using namespace std;int a;int fun ();int main (){ extern int a; int b; a = 100; b = fun(); cout<<b<<end1; return 0;}int fun{){ extern int a; return (10*
[单选题]有以下程序:include using namespace std;int main (){int x=15;while (x>10&&am有以下程序: #include <iostream> using namespace std; int main () { int x=15; while (x>10&&x<50) { x++; if (x/3) { x++; break; } } cout<<x<<endl; return 0; } 执行后的输出结果是A.15B.1
[单选题]有以下程序:include using namespace std;int s=0;class sample{ static int n;publi有以下程序: #include <iostream> using namespace std; int s=0; class sample { static int n; public: sample (int i) { n=i; } static void add() { s+=n; } }; int sample::n=0;A.2B.5C.7D.
[单选题]有以下程序:include using namespace std;int f1(int x, int y){ return x>y ? x:y;}有以下程序: #include <iostream> using namespace std; int f1(int x, int y) { return x>y ? x:y; } int f2(int x, int y) { return x>y? y:x; } int main ( ) { int a = 4,b = 3,c = 5,d,e,f;
[单选题]有以下程序:include using namespace std;int main ( ){ int n[3],i,j,k = 2; for(i有以下程序: #include <iostream> using namespace std; int main ( ) { int n[3],i,j,k = 2; for(i = 0;i<k;i++) n[i] = O; for(i = O;i<k;i++) { for(j = O;j<k;j++) n[j] = n[i] + 1; } cout<<
[单选题]若有以下程序:include using namespace std;int f(){static int i = 0;int s = 1;s£«=若有以下程序: #include <iostream> using namespace std; int f() { static int i = 0; int s = 1; s+=i; i++; return s; } int main() { int i,a = 0; for(i = 0;i<5;i++) a+=f(); cout<<a<<end
[单选题]有下列程序段:include using namespace std;int main() { char b[]= "Hello,you"; b[有下列程序段: #include <iostream> using namespace std; int main() { char b[] = "Hello,you"; b[5] = 0; cout<<b<<end1; return 0; } 执行此程序后,得到的输出结果是( )。A.Hello,youB.Hello0youC.HelloD.
[单选题]有如下程序: include using namespace std; int main() { cout.f有如下程序: #include<iostream> using namespace std; int main() { cout.fill('*') cout.width(6); cout.fill('#') cout<<123<<endl; return 0; } 执行后的输出结果是A.###123B.123###C.***123D.123***
[单选题]有如下程序 include using namespace std; int i=1; class Fun {有如下程序 #include <iostream> using namespace std; int i=1; class Fun { public: static int i; int value( ){ return i-l;} int value( )const { return i+1;} }; int Fun::i=2; int main( ){ int i=3; Fun f
[单选题]有如下程序: include using namespace std; int main(){ int sum;有如下程序: #include<iostream> using namespace std; int main(){ int sum; for(int i=0;i<6;i+=3){ sum=i; for(int j=i;j<6;j++)sum+=j; } cout<<sum<<end1; return 0; } 运行时的输出结果是( )。A.3B.10C.12D.15