网友您好, 请在下方输入框内输入要搜索的题目:
题目内容
(请给出正确答案)
下列程序段的输出结果为( )。 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.2023 24 3540
B.2025 30 3540
C.2023 25 35 40
D.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 35 40D.2025 354045 ” 相关考题
考题
( 20 )有以下程序 include main (){ in i , j , m=1 ;for ( i=1 ; i
( 20 )有以下程序# include < s 七 dio . h >main (){ in i , j , m=1 ;for ( i=1 ; i < 3 ; i++ ){ for ( j=3 ; j > O ; j-- ){if ( i*j )> 3 ) break ;m=i*j ;}}printf ( " m=%d \ n ", m ) ;}程序运行后的输出结果是A ) m=6B ) m=2C ) m=4D ) m=5
考题
(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
考题
下列程序段的输出结果为( )。 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 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 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
考题
2、定义5阶稀疏矩阵,与主对角线相邻元素为行号列号之和,其余元素为0,应使用的语句是A.SparseArray[{{i_,j_}/;j=i+1→i+j,{i_,j_}/;j=i-1→i+j},{5,5}]B.SparseArray[{i_,j_}/;j==i+1→i+j,{i_,j_}/;j==i-1→i+j,{5,5}]C.SparseArray[{{i,j}/;j==i+1→i+j,{i,j}/;j==i-1→i+j},{5,5}]D.SparseArray[{{i_,j_}/;j==i+1→i+j,{i_,j_}/;j==i-1→i+j},{5,5}]
考题
定义5阶稀疏矩阵,与主对角线相邻元素为行号列号之和,其余元素为0,应使用的语句是A.SparseArray[{{i_,j_}/;j=i+1→i+j,{i_,j_}/;j=i-1→i+j},{5,5}]B.SparseArray[{i_,j_}/;j==i+1→i+j,{i_,j_}/;j==i-1→i+j,{5,5}]C.SparseArray[{{i,j}/;j==i+1→i+j,{i,j}/;j==i-1→i+j},{5,5}]D.SparseArray[{{i_,j_}/;j==i+1→i+j,{i_,j_}/;j==i-1→i+j},{5,5}]
热门标签
最新试卷