Search:

Type: Posts; User: oogabooga

Search: Search took 0.05 seconds.

  1. Replies
    6
    Views
    897

    No, that's not possible. You're just doing...

    No, that's not possible. You're just doing something wrong. Try this:


    #include <stdio.h>

    int main(void)
    {
    double d = 9.4;
    printf ("%f\n", d);
    return 0;
  2. Replies
    6
    Views
    897

    You're right of course that it shouldn't matter,...

    You're right of course that it shouldn't matter, but sadly it does on gcc 4.7.1, at least. :(
    The ell should just be ignored, but instead it gets weird.
    E.g., your code snippet just prints...
  3. Replies
    6
    Views
    897

    Don't use %lf with printf. Just use %f for both...

    Don't use %lf with printf. Just use %f for both float and double.
    scanf needs %lf for a double, though.
Results 1 to 3 of 3