已知m=0,以下程序段的输出结果为:for i in range(5): for j in range(10): m+=1;print(m);
A: 15;
B: 50;
C: 5;
D: 10
A: 15;
B: 50;
C: 5;
D: 10
举一反三
- 已知m=0,以下程序段的输出结果为:for i in range(1,8,2): for j in range(3,10,2): m+=1;print(m); A: 15; B: 16; C: 5; D: 6
- 执行下面程序段后,输出的结果为( )。 Dim m(5) As Integer s = 0 For i = 0 To 5 m(i) = 5 Next i For j = 0 To 5 s = s + m(j) Next j Print s
- 有如下程序段: Dim i%, j%, n%, m%, k% m = 0 : k = 0 For i = 1 To 5 k = k + 1 n = 0 For j = 1 To 2 n = n + 1 m = m + 1 Next j Next i MsgBox(k & " " & n & " " & m)运行该程序代码段后,消息对话框中显示的内容为( )。 A: 5 10 2 B: 5 10 10 C: 5 2 10 D: 5 2 2
- 下面程序中语句print(i*j)共执行了_次 for i in range(10): for j in range(1, 5): print(i*j)
- 有以下程序段。Int i,j,m=0; for(i=1;i<=5;i+=4) for(j=3;j<=19;j+=4)m++;printf("%d ",m);程序段的输出结果是( ) A: 12 B: 15 C: 10 D: 25