#include <stdio.h>
int main()
{
printf("%.2g %.2f\n", 2.925, 2.925);
}
I think that the right output should be:
2.93 2.93
Now, the output is the following:
2.9 2.92
There are two misunderstandings:
Why '%.2g' doesn't show the two digits after dot?
Why is the rounding off?