Mega Code Archive
%6f limits the output to only six digits
#include
main(){
printf("%6.1f", 123456.123456);
printf("\n%6.2f", 123456.123456);
printf("\n%6.3f", 123456.123456);
printf("\n%6.4f", 123456.123456);
}
123456.1
123456.12
123456.123
123456.1235