Home > Back-end >  For help
For help

Time:02-18

For (int n=0, I=0; ! N& & i<=5; I++) in the loop! N how to understand??

CodePudding user response:

Looking at this, n and I was almost a way of understanding, n and I equal to zero, when n and I have less than 5 i++, don't know where do you see?

CodePudding user response:

When n is 0, exit the loop, for reference:
 # include & lt; Stdio. H> 
Int main ()
{
int n;
For (int n=0, I=0; ! N& & i<=5; I++) {//in this loop! N how to understand??
Printf (n=% d ", I=% d \ n ", n, I);
+ + n.
}
return 0;
}

//run results:
//n=0, I=0
//please press any key to continue...

CodePudding user response:

Revision # 2 floor, line 4 int n; The excess, delete,

CodePudding user response:

! Here is the not symbol, & amp; & Need to both sides is true only for true (that is, both sides is not equal to zero),! N should be here as a symbol, in a certain condition was set up, change n make loop jump out,

CodePudding user response:

reference 1st floor YueQiong response:
look at this, n and I was almost a way of understanding, n and I equal to zero, when n and I have less than 5 i++, don't know where do you see?

In the question bank ,,,,,,,,,
  • Related