下列程序段的输出结果是( )。Dim M(5,5),S(5)For i=1 To 5S(i)=0For j=1 To 5M(i,j)=i+jS(i)=S(i)+M(i,j)Next jNext iFor Each x In SPrint x;Next xA.20 23 24 35 40B.20 25 30 35 40C.20 23 25 35 40D.20 25 35 40 45
下列程序段的输出结果是( )。
Dim M(5,5),S(5)
For i=1 To 5
S(i)=0
For j=1 To 5
M(i,j)=i+j
S(i)=S(i)+M(i,j)
Next j
Next i
For Each x In S
Print x;
Next x
A.20 23 24 35 40
B.20 25 30 35 40
C.20 23 25 35 40
D.20 25 35 40 45
相关考题:
(25)下列程序段的输出结果是 Dim M(5,5),S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i,j)=i+j S(i)=S(i)+M(i,j) Next j Next i For Each x In S Print x; Next xA.20 23 24 35 40 B.20 25 30 35 40 C.20 23 25 35 40 D.20 25 35 40 45
(27)下列程序段的输出结果是 。 Dim M(5,5),S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i,j)=i+j S(i)=S(i)+M(i,j) Next j Next i For Each x In S Print x; Next xA.20 23 24 35 40 B.20 25 30 35 40 C.20 23 25 35 40 D.20 25 35 40 45
有如下程序 gincludevoid main(){char ch[2] [5]={”6937","8254"),*p[2];int i,j,S 有如下程序 #ginclude<iostream.h> void main() {char ch[2] [5]={”6937","8254"),*p[2]; int i,j,S=0 for(i=0;i<2:i++)p[i]=ch[i]; for(i=0;i<2:i++) for(j=0;p[i] [j]>'\0';j+=2) s=10*s+p[i] [j]-'0': cout<<s;} 该程序的输出结果是( )。A.69825B.63825C.6385D.693825
下列程序的输出结果是______。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
下列程序段的输出结果为( )。 Dim M(5,5), S(5) For i = 1 To 5 S(i) = 0 For j = 1 To 5 M(i, j) = i + j S(i) = S(i) + M(i, j) Next j Next i For Each x In S Print x; Next xA.2023 24 3540B.2025 30 3540C.2023 25 35 40D.2025 354045
下列程序段的输出结果为( )。 Dim M(5,5),S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i,j)=i+j S(i)=S(i)+M(i,j) Next j Next i For Each x In s Print x; Next xA.2023 24 3540B.2025 30 3540C.2023 25 3540D.2025 354045
下列程序段的输出结果为( )。 Dim M(5,5),S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i,j)=i+j S(i)=S(i)+M(i,j) Next j Next i For Each x In S Print x; Next xA.20 23 24 35 40B.20 25 30 35 40C.20 23 25 35 40D.20 25 35 40 45
下列程序段的输出结果为( )。 Dim M(S, S), S(5) For i=1 To 5 S(i)=0 For j=1 To 5 M(i, j)=i+j S(i)=S(i)+M(i, j) Next j Next i For Each x In S Print x; Next xA.20 23 24 35 40B.20 25 30 35 40C.20 23 25 35 40D.20 25 35 40 45
13、有如下程序段: int a[3][3]={{1,2},{3,4},{5,6}},i,j,s=0; for(i=1;i3;i++) for(j=0;ji;j++) s+=a[i][j]; printf(“%d\n”,s); 该程序段的输出结果是()。A.14B.18C.20D.21