double输出格式是%lf吗?
double输出格式是%lf吗?
2007-08-29 08:02
2007-08-29 11:28
2007-08-29 11:33
2007-08-29 16:17
2007-08-29 16:20
2007-08-29 16:21




2007-08-29 17:33
No, simply f, Neither lf nor Lf:
For printf():
l: The argument is interpreted as a long int or unsigned long int for integer specifiers (i, d, o, u, x and X), and as a wide character or wide character string for specifiers c and s.
L: The argument is interpreted as a long double (only applies to floating point specifiers: e, E, f, g and G).
For scanf():
l : long int (for d, i and n), or unsigned long int (for o, u and x), or double (for e, f and g)
L : long double (for e, f and g)

2007-08-29 18:01

2007-08-29 18:20
2007-08-29 19:15