i am having a hard time printing float variable. It gives me extra numbers, that shouldn´t be there. Here is example:
float number;
char temp[50];
fgets ( temp, sizeof temp, fr ); //reading string from file, example: 99.10
number=atof(temp);
printf("%lf",number); //console output: 99.101563
This is obviously wrong output. Any suggestions?