#include<stdio.h>
int main ( void ){
float y = 12.0809;
printf("The number %.2f is a float\n");
return 0;
}
I know that %.2f
is used to consider only two decimal places, but I'd like to know what an integer serves before the period. For example, %7.2f
or %3.2f
. If the number that comes after the point is used to limit the number of decimal places, what is the number that comes before the point?