I am having problem with floating point numbers. I think something is clashing here.
The output is :
You should use
scanf("%lf", &y);