VB dim x as integer dim i as integer x = 100 for i = 1 to 100 step 5 x = x - i / 6 next i print x

问题描述:

VB dim x as integer dim i as integer x = 100 for i = 1 to 100 step 5 x = x - i / 6 next i print x
我用手机编的 不好排版 我的答案上是-54

dim x as integer
dim i as integer
x = 100
for i = 1 to 100 step 5
x = x - i / 6
next i
print x
实际为x=100-1/6取整-6/6取整-11/6取整.
结果-61
你的答案错了吧,我试验了,结果是-61