the power function gives zero when i use %d but it works with %f. Why?