#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0

    Printf statment help


    how do i write a printf statement to display the number 1025.987674 to 001025.988?

    i was thinking about printf("%2.0f",1025.987674); but it just moves the numbers around.
  2. #2
  3. Contributing User
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Aug 2011
    Posts
    4,931
    Rep Power
    481
    Without reading the manual, I'll guess the format code is
    %010.3f but maybe you'll have to write special code for it.
    [code]Code tags[/code] are essential for python code and Makefiles!
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2013
    Posts
    2
    Rep Power
    0
    Yeah, it works. Thanks!

IMN logo majestic logo threadwatch logo seochat tools logo