I try to read a float in a string using sscanf or atof. It seems to work but then it's a bit strange when I manipulate the value obtained.
Code:
float fl; char str[]="1.43" fl=atof(str); printf("%f\n",floor(1000.0*fl) );
It seems to be due to the precision of the float...
Leave a comment: