I want to display floating point number with fixed width before decimal. So far I managed to do it by taking the integer part, displaying desired width and filling with 0 using "%03d" before number value and then displaying the decimal part. I want to know if there is standard way of displaying like for example "%3.3f". I tried the following
printf("value: %3.3f", value);
But the result was only 1 digit before decimal.
How can I achieve it ?