网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
以下程序的输出结果是()。 main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i<3;i++) for(j=0;j<=i;j++) s+=a[i][j]; printf("%d/n",s); }
A

18

B

19

C

20

D

21


参考答案

参考解析
解析: 暂无解析
更多 “单选题以下程序的输出结果是()。 main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i3;i++) for(j=0;j=i;j++) s+=a[i][j]; printf("%d/n",s); }A 18B 19C 20D 21” 相关考题
考题 有以下程序:int f(int b[][4]){int i,j,s=0;for(j=0;i2)i=3-j;s+=b[i][j];}ret 有以下程序: int f(int b[][4]) { int i,j,s=0; for(j=0;i<4;i++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4,},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); } 执行后的输出结果是( )。A.12B.11C.18D.16

考题 以下程序的输出结果是【 】。include main() {int i,j,sum; for(i=3;i>=-1;i-) (sum=0; fo 以下程序的输出结果是【 】。include<stdio.h>main(){int i,j,sum;for(i=3;i>=-1;i-)(sum=0;for(j=1;j<=i;j++) sum+=i*j;}printf("%d\n,sum);}

考题 以下程序的输出结果是()。includevoid main(){int a(5),b(6),i(0),j(0);switch(a) { 以下程序的输出结果是( )。 #include<iostream.h> void main() { int a(5),b(6),i(0),j(0); switch(a) { case 5:switch(b) { case 5:i++;break; case 6:j++;break; default:i++;j++; } case 6:i++; j++; break; default:i++;j++; } cout<<i<<","<<j<<endl; }A.1,2B.1,3C.2,2D.2,3

考题 有如下程序: main() { int a[3][3]={{i,2},{3,4},{5,6}},i,j,s=0; for(i=1;i<3;i++) for(j=0;j<=i;j++) s+=a[i][j]; printf("%d\n",s); } 该程序的输出结果是______。A.18B.19C.20D.21

考题 以下程序的输出结果是【】。 include using namespace std; int main() {int s,i;for(s= 以下程序的输出结果是【 】。include <iostream>using namespace std;int main(){int s,i;for(s=0,i=1;i<3;i++)s+=i;cout<<s<<end1;return 0;}

考题 以下程序的输出结果是 ( ) main( ) { int a[3] [3]={1,2},{3,4,},{5,6,},i,j,s=0; for(i=1;i<3;i+ +) for(j=0;j<i;j+ +) s+=a [i][j]; printf ("%d\n",s); }A.18B.19C.20D.21

考题 有以下程序 main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i<3;i++) for(j=0;j<=i;j++)s+=a[i][j]; printf("%d\n",s); } 程序运行后的输出结果是( )A.18B.19C.20D.21

考题 有以下程序,程序运行后的输出结果是______。 int f(int b[][4]) { int i,j,s=0; for(j=0;j<4;i++) { i=j; if(i>2)i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6,},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(A) ); }A.22B.11C.18D.16

考题 下列程序的输出结果是______。main(){ int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i<3;i++) for(j=0;i<=i;j++)s+=a[i][j]; printf("%d\n",s);}A.18B.19C.20D.21

考题 有以下程序,程序运行后的输出结果是______。 int f(int b[][4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2)i=3-j; s+==b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); }A.22B.11C.18D.16

考题 有以下程序:include int f(int b[] [4]){int i,j,s=0; for(j=0;j2) 有以下程序: #include <stdio.h> int f(int b[] [4]) { int i,j,s=0; for(j=0;j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s; } main() { int a[4][4]={{1,2,3,4},{0,2,4,6},{3,6,9,12},{3,2,1,0}}; printf("%d\n",f(a)); } 执行后的输出结果是( )。A.12B.11C.18D.16

考题 有以下程序:include using namespace std;class A{public: A(int i,int j) { a=i; b= 有以下程序: #include <iostream> using namespace std; class A { public: A(int i,int j) { a=i; b=j; } void move(int x,int y) { a+=x; b+=y; } void show() { cout<<a<<","<<b<<end1; } private: int a,b; }; class B: private A { public: B(int i,int j): A(i,j) {} void fun() { move(3,5); } void fl () { A::show(); } }; int main() { B d(3,4); d.fun(); d.f1(); return 0; } 程序执行后的输出结果是A.3,4B.6,8C.6,9D.4,3

考题 有以下程序:include using namespacestd;class A{public:A(int i,int j){ a=1; b=j;} 有以下程序:#include <iostream>using namespace std;class A{public: A(int i,int j) { a=1; b=j; } void move (int x,int y) { a+=x; b+=y; } void show() cout<<a<<","<<b<<end1 } private: int a,b; }; class B : private A { public: B(int i,int 3):A (i,j) {} void fun() { move (3,5); } void f1() { A::show(); } }; int main() { B d(3,4); d.fun(); d.f1(); return 0; } 程序执行后的输出结果是A.3,4B.6,8C.6,9D.4,3

考题 以下程序的输出结果是()。includemain(){int a[3][3]={0,1,2,0,1,2,0,1,2},i,j,s=1;for 以下程序的输出结果是( )。 #include<stdio.h> main() {int a[3][3]={0,1,2,0,1,2,0,1,2},i,j,s=1; for(i=0;i<3;i++) for(j=i;j<=i;j++) s+=a[i][a[j][j]]; printf("%d\n",s); }A.3B.4C.1D.9

考题 以下程序的输出结果是( )。 main { int a[3][3]=“l,2),{3,4),{5,6)},i,j,s=0; for(i=1;i3;i++) for(j=0;j=i;j++)s+=a[i][j]; printf(”%d\n”,s); }A.18B.19C.20D.21

考题 以下程序的输入结果是 ______。includevoid main(){ int a[3][3]=({2},{3,4},{5,6}, 以下程序的输入结果是 ______。 #include<iostream.h> void main(){ int a[3][3]=({2},{3,4},{5,6},}, i,j, s=0; for(i=1; i<3;i++) for(j=1; j<=i; j++) s+=a[i][j]; cout<<s; }A.10B.18C.20D.21

考题 若有以下程序include using namespace std;class A{public: A(int i,int j) {a=i;b=j 若有以下程序 #include <iostream> using namespace std; class A { public: A(int i,int j) { a=i; b=j; } void move(int x, int y) { a+=x; b+=y; } void show() { cout < <a < <" , " <<b<< end1; } private: int a,b; }; class B : private A { public: B(int i,int j) :A(i,j) {} void fun ( ) { move (3, 5); } void f1 ( ) { A::show(); } }; int main ( ) { B d(3,4); d. fun ( ); d.f1(); return 0; } 程序执行后的输出结果是 ( )。A.3,4B.6,8C.6,9D.4,3

考题 若有以下程序main(){ int a[4][4]={{1,2,-3,-4},{0,-12,-13,14},{-21,23,0,-24},{-31,32,-33,0}}; int i,j,s=0; for(i=0;i4;i++) { for(j=0;j4;j++) { if(a[i][j]0) continue; if(a[i][j]==0) break; s +=a[i][j]; } } printf("%d\n",s);}程序执行后的输出结果是

考题 有以下程序:int f(int b[][4]){ int i, j, s=0;for(j=0j2) i=3-j;s+=b[i][j]; 有以下程序:int f(int b[][4]){ int i, j, s=0; for(j=0j<4;j++) { i=j; if(i>2) i=3-j; s+=b[i][j]; } return s;}main(){ int a[4][4]={ { 1,2,3,4}, {0,2,4,6},{3,6,9,12 }, {3,2,1,0} }; printf("%d\n", f(a)); }执行后的输出结果是( )。A.12B.11C.18D.16

考题 以下程序的输出结果是()。include Void main(){int a[3][3]= { { 1,2 }, { 3,4 }, { 以下程序的输出结果是( )。#include <iostream.h>Void main(){ int a[3][3]= { { 1,2 }, { 3,4 }, { 5,6 } }, i, j, s=0; for(i=1;i<3;i++) for(j=0;j<i; j++) s+=a[i][j]; cout<<s<<end1;}A.14B.19C.20D.21

考题 以下程序的输出结果是______。 main () { int x=5,n=3,s,j; for(j=0;j<2;j++) { s=fun(x,n); printf("%d",s); } } fun(int a,int b) { static int n=0,i=2; i=n+1; n=i+a-b; return(n); }A.3 7B.3 5C.3 6D.3 3

考题 有如下程序: main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i<3;i++) for(j=0;j<=i;j++) s+=a[i][j]; printf("%d\n",s); } 该程序的输出结果是______。A.18B.19C.20D.21

考题 下列程序执行后的输出结果是( )。include main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i A、14B、12C、20D、21

考题 有以下程序:int f(int b[][4]){int i, j, s=0;for(j=0; j2)i=3-j;S+=b[i][j]; 有以下程序: int f(int b[][4]) { int i, j, s=0; for(j=0; j<4; j++) { i=j; if(i>2)i=3-j; S+=b[i][j]; } return s; } main() { int a[4][4]={{1, 2, 3, 4}, {0, 2, 4, 6}, {3, 6, 9, 12}, {3, 2, 1, 0}}; printf("%d\n", f(a)); } 执行后的输出结果是______。A.12B.11C.18D.16

考题 下面程序的输出结果是()。include using namespace std;void main( ){ inta[3][3] ={{ 下面程序的输出结果是( )。 #include <iostream> using namespace std; void main( ) { inta[3][3] ={{1,2},{3,4},{5}}; int s =0; for(int i=1;i<3;i++) for(int j=0;j<=i;j++) s+=a[i][j]; cout<<s<<endl;A.12B.4C.15D.13

考题 以下程序输出结果是 ______。includevoid main(){ int a[3][3]={1,3,5,7,9,10,13,1 以下程序输出结果是 ______。 #include<iostream.h> void main(){ int a[3][3]={1,3,5,7,9,10,13,15,17},sum=0,i,j; for(i=0;i<3:i++) for(j=0;j<3;j++){ a[i][j]=i+j; if(i= =j)sum=sum+a[i][j]; } cout<< "sue="<<sum; }A.15B.25C.6D.9

考题 以下程序的输出结果是()。 main() { int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i3;i++) for(j=0;j=i;j++) s+=a[i][j]; printf("%d/n",s); }A、18B、19C、20D、21