Added Makefile and updated main.cpp to be Mac OS X friendly

scanf("%f",x); became scanf("%lf",x);