when u store 0.08 on the float variable a then it does not store exactly
0.08 on 'a'
actually it store 0.79999999
that's why after comparition it make less quantity with 0.08
i.e 'if ' condition is true and print it HELLO

On Sun, May 29, 2011 at 9:21 AM, Ankit Agarwal <[email protected]>wrote:

> #include<stdio.h>
>
> int main(void)
> {
>     float a=0.08;
>     if(a<0.08)
>         printf("Hello\n");
>     else
>         printf("Hii\n");
>     return 0;
> }
>
> The o/p is: *Hello *   why????
>
> --
> Ankit Agarwal
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to