For bosses to help see the realization of the second question is:
Why am I the while loop will always call my myround ()?
Always want to input data, realize the function of the data to test until the end of the input symbol
How to implement?
CodePudding user response:
Floating point Numbers not precise Numbers, use==or!=it is possible to get the desired results,Try abs (a) & lt; 0.0001
CodePudding user response:
Well, you used a vs2010? Abs may want to convert into fabsCodePudding user response:
I think a - (int) a & gt; 5 how is greater than 5? This judge is a fake?Should not be greater than 0.5?
The main function of the scanf should be % f, not f
CodePudding user response: