SyntaxFix
Write A Post
Hire A Developer
Questions
scanf needs to know the size of the data being pointed at by &d to fill it properly, whereas variadic functions promote floats to doubles (not entirely sure why), so printf is always getting a double.
scanf
&d
printf
double