View Single Post
Old 10-07-2005, 09:05 PM   #1 (permalink)
ericthered13
Registered User
 
Join Date: Oct 2005
Posts: 1
ericthered13 is on a distinguished road
Round a Decimal withOUT the leading zero

Does anyone know how I could use printf to display a decimal number without the leading zero?

Something like,
{
...
x = .45;
printf ("%lf", x);
...
}
and have that display '.45' instead of '0.45'?

Last edited by ericthered13; 10-08-2005 at 01:53 PM.
ericthered13 is offline   Reply With Quote