Home > Back-end >  The C language
The C language

Time:06-11

While the M why not require greater than zero?

CodePudding user response:

When M is equal to zero, into a bool type to false, this end of cycle

CodePudding user response:

reference 1st floor Italink response:
when M is equal to zero, into a bool type to false, the end of cycle

Bool type what do you mean?

CodePudding user response:

While (check this expression is 0)
Is
0 exit cycleIs not zero continue to cycle

CodePudding user response:

reference lin5161678 reply: 3/f
while (check this expression is 0)
Is
0 exit cycleIs not zero continue to cycle

While checking the condition of zero? Logic operation?

CodePudding user response:

While in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 for false

CodePudding user response:

reference 5 floor Italink reply:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false
C
There is no such rules

CodePudding user response:

reference 5 floor Italink reply:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false

A little understood, that is, when M reduce to zero is the loop body is over?

CodePudding user response:

refer to 7th floor qq_45718176 response:
Quote: refer to the fifth floor Italink reply:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false

A little understood, that is, when M reduce to zero is the loop body is over?

You and that's on the logic of the code, to 0 is the end of cycle, while (x) the cycle, if is 0, continued to circle, 0 is out of circulation,

CodePudding user response:

refer to the eighth floor datoulaile123 response:
Quote: refer to 7th floor qq_45718176 response:

Quote: refer to the 5 floor Italink response:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false

A little understood, that is, when M reduce to zero is the loop body is over?

You and that's on the logic of the code, to 0 is the end of cycle, while (x) the cycle, if is 0, continued to circle, 0 is out of circulation,

This is the c language logic?

CodePudding user response:

references 9 f qq_45718176 response:
Quote: refer to the eighth floor datoulaile123 response:
Quote: refer to 7th floor qq_45718176 response:

Quote: refer to the 5 floor Italink response:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false

A little understood, that is, when M reduce to zero is the loop body is over?

You and that's on the logic of the code, to 0 is the end of cycle, while (x) the cycle, if is 0, continued to circle, 0 is out of circulation,

This is the c language logic?

Why M not less than zero cycle

CodePudding user response:

references to the tenth floor qq_45718176 response:
Quote: references 9 f qq_45718176 response:
Quote: refer to the eighth floor datoulaile123 response:
Quote: refer to 7th floor qq_45718176 response:

Quote: refer to the 5 floor Italink response:
while in parentheses is a bool type parameters, if you give other types, there will be an implicit type conversion, turn int bool rule is that non-zero to true, 0 to false

A little understood, that is, when M reduce to zero is the loop body is over?

You and that's on the logic of the code, to 0 is the end of cycle, while (x) the cycle, if is 0, continued to circle, 0 is out of circulation,

This is the c language logic?

Why M not to less than zero cycle

Because the cycle is over 0, since is a cycle, there will always be the end of the conditions (except what death cycle, die condition or the end of the cycle is also because there is no written never satisfied), now that you have meet the condition of jump out of the loop, that, of course, want to jump out, program is loyal, you let it do so, he will do so!!!!!

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