I can't scan a double to a variable.
This is my code, it is very simple. I built it with command:
gcc -Wall -Wextra -Wpedantic -ansi -c double.c
#include <stdio.h>
int main() {
double f;
scanf("%lf", &f);
printf("%lf\n", f);
return 0;
}
Input: 5.5 (or any other numbers)
Output: 0 (always)
I am using (GCC) 4.9.3.