can also do it with floatCode:float a = 0.77f; int b = Convert.ToInt32(100 * a); console.WriteLine(b.ToString());
| CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
|
Results 1 to 7 of 7
Thread: Surprise! 0.77 * 100 == 76Threaded View
|
Click Here to Expand Forum to Full Width |