W
wombat
Is there a way to prevent rounding when using printf for print a
double/float?
Example:
double x=3.51;
printf("%.0f\n", x);
The output of this is 4, when I want it to be 3.
I've been surfing the net but I've been coming up empty. Big thanks for
any help.
double/float?
Example:
double x=3.51;
printf("%.0f\n", x);
The output of this is 4, when I want it to be 3.
I've been surfing the net but I've been coming up empty. Big thanks for
any help.