retrieve double variable in scanf

This is a discussion on retrieve double variable in scanf within the C Programming forums, part of the General Programming Boards category; Hi I know that with %d parameter in scanf function you can retrieve integer data types from keyboard. Also with ...

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    20

    retrieve double variable in scanf

    Hi

    I know that with %d parameter in scanf function you can retrieve integer data types from keyboard. Also with %f parameter you can retrieve float data types. So how can I retrieve double types ? ( I use both %d and %f parameters but none work )

    Thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Well, here's the man page. Try "%lf". Read that link for more info.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need some help...
    By darkconvoy in forum C Programming
    Replies: 32
    Last Post: 04-29-2008, 04:33 PM
  2. C++ to C Conversion
    By dicon in forum C Programming
    Replies: 7
    Last Post: 06-11-2007, 09:38 PM
  3. Conversion From C++ To C
    By dicon in forum C++ Programming
    Replies: 2
    Last Post: 06-10-2007, 03:54 PM
  4. expected primary expression
    By mju4t in forum C Programming
    Replies: 2
    Last Post: 03-27-2007, 07:59 PM
  5. Hi, could someone help me with arrays?
    By goodn in forum C Programming
    Replies: 20
    Last Post: 10-18-2001, 10:48 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21