当前位置:首页> 阅读下面的程序段: For a=1 To 2 For b=1 To a For c=b To 2 i=i+1 Next Next Next Print i 执行上面的3重循环后,i的值为 > - 题目详情
问题详情
阅读下面的程序段: For a=1 To 2 For b=1 To a For c=b To 2 i=i+1 Next Next Next Print i 执行上面的3重循环后,i的值为
时间:2022-01-05 15:54
关键词:
答案解析
- 以下程序的输出结果是 ______。 Dim n(2,2), i, j As Integer For i = 0 To 2 For j = 0 To 2 n(i,j) = i + j Next j Next i For i = 0 To 1 For j = 0 To 1 n(i+ 1 ,j + 1) = n(i + 1,j + 1) + n(i, j) Next j Next i Print n(i, j)
- 下列程序段的执行结果为______。 K=0 For J = 1 To 2 For I = 1 To 3 K=I+1 Next I For I = 1 To 7 K=K+1 Next I Next J Print K
- 下列程序段的执行结果为______。 Private Sub Command1_Click() n = 0 For a = 1 To 20 For b = 1 To 20 For c = 1 To 20 If a * a + b * b - c * c Then n=n+l End If Next c Next b Next a Print n End Sub
- 阅读下面的程序段: a==0 For i=1 To 3 For j=1 To i For k=j To 3 a=a+l Next k Next j Next i 执行上面的程序段后,a的值为( )。
- 运行下面的程序后,输出的结果为 Cls Dim t(5,5)as Integer For i=1 To 5:t(i,i)=1:Next For i=1 To 5 For j=1 To 5 Print t(i,j), Next Print Next