I've made extremely easy program:
#include <stdio.h>
int main()
{
double x;
printf("Write your number \n");
scanf ("%f", &x);
printf("You've written %f \n", x);
return 0;
}
And as a result strange number appears (no matter what x I give):
"You've written 83096261053132580000000000000000000000000000000000000000000
"
What's wrong with this? This program works fine when I change all numbers into an 'int' type.