如果我将变量 numCount 设置为 100,程序将无法准确,但使用 25 这样的数字,它可以正常工作。这是怎么回事?
print "Fizzbuzz"
numCount = 0
while numCount < 100:
numCount = numCount + 1
if (numCount % 3) == 0:
if (numCount % 15) == 0:
print "Fizzbuzz"
else:
print "Fizz"
if (numCount % 5) == 0:
if (numCount%15) == 0:
print "Fizzbuzz"
else:
print "Buzz"
else:
print numCount