I am writing a very small code just scanf
and printf
. I am reading a double value and printing it. The conversion specification %lf
works properly to read a double value. But, it doesn't work with printf.
When I am trying to print that value I am getting output like 0.000000
double fag;
scanf("%lf", &fag);
printf("%lf", fag);
But, if I use %f in printf it works properly.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…