printing 6 decimal digits

I have a float f. How do I ask the program to print 6 decimal digits?
Topic archived. No new replies allowed.