Dim i As Integer,n As Integer For i = 0 To 50 i = i + 3 n = n + 1 If i > 10 Then Exit For Next Pri
问题描述:
Dim i As Integer,n As Integer For i = 0 To 50 i = i + 3 n = n + 1 If i > 10 Then Exit For Next Pri
Dim i As Integer,n As Integer
For i = 0 To 50
i = i + 3
n = n + 1
If i > 10 Then Exit For
Next
Print n
怎么算
答
实现效果,输出结果3原理:For i = 0 To 50定义i从0循环到50i = i + 3这时i=0,所以其语句将原来的i值加上3得3n = n + 1累加nIf i > 10 Then Exit For判断i是否大于10,若是则跳出循环第一次:i=0i=3n=1第二次:i=3i=6n...