Home > Back-end >  The small white. Look at where there is a problem for me
The small white. Look at where there is a problem for me

Time:10-19

Why he is always output 2,,,

CodePudding user response:

The loop condition is not satisfied, and skip

CodePudding user response:

Don't use while either in loop statement, or you could change a judgment conditions, while instead (b<100).

CodePudding user response:

While (true) in curly braces {} is executing code, otherwise skip cycle, you b=2, 2, & lt; 100, the b & gt; Code 100 is false, just skip cycle, do not perform in the loop statement,

CodePudding user response:

Because b=2, and 2 & lt; 100, so don't satisfy the loop condition, nor to a, b produces change
So b=2
  • Related