double输出格式是%lf吗?
double输出格式是%lf吗?
%f
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)