The following code
int i=0;
while(i<10) {
printf("%d
", i++);
}
is equivalent to
int i=0;
while(i<10) {
printf("%d
", i); i++;
}
But the following code
int i=0;
while(i<10) {
printf("%d
", i+=2);
}
is equivalent to
int i=0;
while(i<10) {
i+=2; printf("%d
", i);
}
How to make it equivalent to
int i=0;
while(i<10) {
printf("%d
", i); i+=2;
}
the same as i++
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…