I just started learning C and I have a very funny problem. I will let the code speak for itself. On scanf I give the value 25.15:
long double input;
scanf("%Lf", &input);
printf("%Lf\n", input); //its correctly 25.150000
input = input - 0.75;
printf("%Lf\n", input); //Instead of something resembling 24.4 I get -2
How is it possible that 25.15 - 0.75 gives me -2?