Re: [Dev-C++] Peter You Problem I Solved the Problem.
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <jos...@ya...> - 2001-03-06 15:58:27
|
Peter, There're weird thing with float numbers when you try to round or to use the modulus division. If you use double instead of float you'll see that the problem is over. I don't know why but I had the same problem with a currency converter program. Using (int p = 100 * (float) 0.65) was converted to int 64 whilst double 0.65 was converted to int 65. Hope this helps Chemanuel __________________________________________________ Do You Yahoo!? Get email at your own domain with Yahoo! Mail. http://personal.mail.yahoo.com/ |