Thread: about printf

  1. #1

    Question about printf

    hi all,

    i m trying to print more than 6 digits after the point.(ex: 0.00000768)

    but i cant do this.

    for example
    double x;
    prưntf("%f", x);

    this program prints 0.000008.but i want to prin 0.000007 or 0.00000764(this numbers are just examples)

    what should i do??

  2. #2
    Registered User
    Join Date
    Mar 2002
    Hi, this should work

    printf("%.8f\n",x); - Portfolio site

  3. #3

    Talking thanks


Popular pages Recent additions subscribe to a feed

Similar Threads

  1. making it portable.....?
    By ShadeS_07 in forum C Programming
    Replies: 11
    Last Post: 12-24-2008, 09:38 AM
  2. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  3. segmentation fault upon reload
    By yabud in forum C Programming
    Replies: 8
    Last Post: 12-18-2006, 06:54 AM
  4. Simple C question: user input to repeat a loop
    By evernaut in forum C Programming
    Replies: 2
    Last Post: 11-18-2006, 09:23 AM
  5. Drawing tables in C
    By stanoman in forum C Programming
    Replies: 5
    Last Post: 10-09-2003, 10:14 AM