Re: float
Thomas Weber <[email protected]> Tue, 11 Jan 2011 08:46:08 +0100
| Newsgroups | org.kernel.vger.linux-c-programming |
|---|---|
| Message-ID | <[email protected]> |
Am 11.01.2011 08:38, schrieb ratheesh k:
> I could not understand why it getting printed like this. Could any
> body tell me.
>
> #include <stdio.h>
>
> int main()
> {
> float f=0.0f;
> int i;
>
> for(i=0;i<10;i++)
missing braces here?
> f = f + 0.1f;
>
> if(f == 1.0f)
> printf("f is 1.0 \n");
> else
> printf("f is NOT 1.0\n");
>
> return 0;
> }
> --
Thomas