Home > Back-end >  To solve the C language
To solve the C language

Time:06-07

Behind the while statement number in brackets are real words, is a decimal number

CodePudding user response:

While it is actually a predication really true or false
But can be used in C/C + + 0 say false, not the number of zero is true

CodePudding user response:

reference 1st floor qq_45798109 response:
while it is actually a predication really true or false
But can use C/C + + 0 say false, not the number of zero is true

The parentheses is the number of decimal word is true?

CodePudding user response:

Yes, so long as is not zero,,

CodePudding user response:

reference qq_45798109 reply: 3/f
yes, so long as is not zero,,

Oh, oh, thank you,,,,,,,

CodePudding user response:

You also want to accuracy problem, of course, I'm not talking about is for the computer to read the value of the zero, such as you set a float f=0.000000000001 for the computer he is 0

CodePudding user response:

refer to the second floor qq_45896193 response:
Quote: refer to 1st floor qq_45798109 response:
while it is actually a predication really true or false
But can use C/C + + 0 say false, not the number of zero is true

The parentheses is the number of decimal word is true?

For floating-point number compared with 0, Suggestions from the web search;

For example, while (fabs (x) & gt; 1-6 e)//if less than 1 e - 6 is considered to be zero.

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