Home > Back-end >  I this C what's the problem
I this C what's the problem

Time:11-24

I no matter what input Numbers, the results is 0.00000, I was wrong?

CodePudding user response:

Double should use "% lf" rather than "% f"

CodePudding user response:

% l f

CodePudding user response:

Replace with lf % % f, at least in the output when want to use % lf, otherwise the result will be truncated, from double to single precision output ~

CodePudding user response:

reference 3 building self-confidence boy reply:
are replaced with % lf % f, at least at the time of the output to use % lf, otherwise the result will be truncated, from double to single precision output ~
said against the
Input must use % lf otherwise will be truncated according to float input you say write only 4 bytes of data
Output with % % f or lf can be
  • Related