I am trying to print some floating point numbers using printf
.
For example:
int main()
{
printf("%.1f",76.75);
return 0;
}
Output: 76.8
And I have some questions about the result.
First of all, why didn't it print 76.7
?
Second, how did it round the number?