Not solve, % lf; But to float n; Can assignment that is eight,
#include
#include
using namespace std;
Int main ()
{double n;
The scanf (" % f ", & amp; n);
Printf (" % f ", n);
return 0;
}
CodePudding user response:
Lf the scanf (" % ", & amp; n); Lf not line? Long floatCodePudding user response:
Lf the scanf (" % ", & amp; n); Should ok,CodePudding user response:
I can't, the scanf (" % lf ", & amp; n); I tried just cannot copy; I create the CPP fileCodePudding user response:
Unable to assignmentCodePudding user response:
Try the le or lg,CodePudding user response:
Using the scanf (" % lg ", & amp; n); Or use the scanf (" % le ", & amp; n); Can be assigned;But the output of the printf must use % f
Why???????
It is ok. C document! So why not CPP?
CodePudding user response:
Verified, the scanf (" % lf ", & amp; n); Yes, vc + + (2010 and 2013), BCC, 6.70 GCC 4.7.0 can,CodePudding user response:
Your codeblock use is what the compiler, that version?