for double, the strange output


            double d = -0.1;              (int = 0; < 100; i++)              {                  d += 0.1;                  console.writeline(d);              }              console.readkey();

it results following:

how solve problem?

use decimal!

 http://stackoverflow.com/questions/618535/what-is-the-difference-between-decimal-float-and-double-in-c

noam b.



not forget vote answer/helpful, please. encourages you...



Visual Studio Languages  ,  .NET Framework  >  Visual C#



Comments

Popular posts from this blog

Problem In Configuring Biztalk 2009 In Creating A ReceivePort.When I Try To Create A Receive POrt I Got This Error

BizTalk Server 2013 Azure VM Log Shipping and HA for hosts

Deleting duplicate values from a collection?