why this behave like this
Code:
void main()
{
      double  a=0.0;
      int i;
      for(i=0;i<=9;i++)
      {
      a+=0.1;
      }
      printf("%lf",a);//--------------->1.000000
      if(a==1.000000)
         printf("yes");
      else
         printf("no");
}
ouput--------no
why output is always no. please explain it.

Last edited by shabbir; 11Sep2007 at 18:04.. Reason: Code block