When I put 1 for example this return 1.000 (that's fine to me):
#include <stdio.h>
main()
{
float num;
printf("Double: ");
scanf("%f", &num);
printf("%f\n", num);
}
So, when I put 1 at this it returns 0.000. I don't understand because I used %f to read and write correctly. Can you guys explain me?
#include <stdio.h>
main()
{
double num;
printf("Double: ");
scanf("%f", &num);
printf("%f\n", num);
}