Home > Back-end >  O bosses have a look
O bosses have a look

Time:06-08

#include
Int main ()
{
Int I=5;
Do
{
The switch (I % 2)
{
Case: 0 - I; break;
Case 1: (I) -; continue;
}
i--; i--;
Printf (" % d ", I);
} while (i> 0);
return 0;
}
Operation result is 1, why the second cycle to continue go out? Don't continue to perform output - 3???

CodePudding user response:

Continue is such, across the back of the program, from the next cycle starts again

CodePudding user response:

For the first time after the continue jump straight to the while, the words I still have not used this usage, I do {} while (0); Is to ensure that the macro definition statements as a whole,

CodePudding user response:

The continue here refers to jump out of the while loop, so will not continue to run the following program, directly go to the next time the while loop

CodePudding user response:

After the continue to judge the conditions of the while, so I=1 ~ exit cycle

CodePudding user response:

references 4 building self-confidence boy reply:
after the continue to judge the conditions of the while, so I=1 exit loop ~

The continue in whether the switch is jump while loop, not jump of the switch, I began to understand to judge the switch after into the continue execution

CodePudding user response:

Not the second cycle, is the third cycle, I=0 exit,

CodePudding user response:


I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10581430.html
I hope it can help you: https://blog.csdn.net/it_xiangqiang/category_10768339.html
  • Related