How could I round down float type variable? (using printf
)
for example,
float x = 3.35;
printf("%.1f", x);
In this situation, it will print out 3.4 but i want it to print 3.3.
Is there any way to do it? (without using trunc
or floor
function)