> 其他 >
VB 代码计算能被3或者5整除数三位数之和
Dim i As Integer,x As Integer
For i = 100 To 999
If i Mod 3 = 0 And i Mod 5 = 0 Then
x = x + i
End If
Next i
Label1.Caption = x
应该是x=x+i出问题了
人气:254 ℃ 时间:2020-01-29 00:51:25
解答
x要定义长整数 就是long没明白什么意思。。。dim x as longinteger只能到32767 你这个编码中X超出这个值了 用LONG吧
推荐
猜你喜欢
© 2024 79432.Com All Rights Reserved.
电脑版|手机版