while(n–)和for(int i=0;i

while(n–)改变了n的值,如果后面有关于n的运算便会出错。int型变量做除法是要小心除成小数后为0。

————————

While (n –) changes the value of N. if there is an operation on N later, an error will occur. When dividing an int variable, be careful to divide it to 0 after the decimal.