Hi,
#include<stdio.h>
int main( void )
{
float a = 0.2;
if( a > 0.2 )
printf( "\n a is greater than 0.2" );
else if( a < 0.2 )
printf( "\n a is less than 0.2" );
else
printf( "\n a is equal to 0.2" );
return 0;
}
the out put of the above program is "a is greater than 0.2" .
the reason i think is that, the variable a stores 0.2 as 0.259595, but why is it so.
if i want to compare two float values for some precession how to do that.
Regards,
Iam3R