VB中一句 代码后面跟了一个冒号,冒号后面又跟了一句代码,就像下面的例子:For i = 0 To 700:b(i) = 0:Next i b(0) = 1:n = 0 For i = 1 To a c = 0 For j = 0 To n b(j) = b(j) * i + c c = b(j) \ 10000 b(j) = b(j) Mod 10000 Next j

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/14 02:49:58

VB中一句 代码后面跟了一个冒号,冒号后面又跟了一句代码,就像下面的例子:For i = 0 To 700:b(i) = 0:Next i b(0) = 1:n = 0 For i = 1 To a c = 0 For j = 0 To n b(j) = b(j) * i + c c = b(j) \ 10000 b(j) = b(j) Mod 10000 Next j
VB中一句 代码后面跟了一个冒号,冒号后面又跟了一句代码,
就像下面的例子:
For i = 0 To 700:b(i) = 0:Next i
b(0) = 1:n = 0
For i = 1 To a
c = 0
For j = 0 To n
b(j) = b(j) * i + c
c = b(j) \ 10000
b(j) = b(j) Mod 10000
Next j
If c > 0 Then n = n + 1:b(n) = c
Next i
如上程序,代码后面跟了一个冒号,冒号后面又跟了一句代码,

VB中一句 代码后面跟了一个冒号,冒号后面又跟了一句代码,就像下面的例子:For i = 0 To 700:b(i) = 0:Next i b(0) = 1:n = 0 For i = 1 To a c = 0 For j = 0 To n b(j) = b(j) * i + c c = b(j) \ 10000 b(j) = b(j) Mod 10000 Next j
有时候不想换行的话,先把几个语句放在同一行,就可以用冒号把不同语句分隔.
For i = 0 To 700: b(i) = 0: Next i

For i = 0 To 700
b(i) = 0
Next i
是等效的.就是一样的.