SyntaxFix
Write A Post
Hire A Developer
Questions
Because C will promote floats to doubles for functions that take variable arguments. Pointers aren't promoted to anything, so you should be using %lf, %lg or %le (or %la in C99) to read in doubles.
%lf
%lg
%le
%la