While you are at it, I would suggest that you turn on compiler warnings:
Originally Posted by itCbitC
You might see some helpful stuff like
gcc -Wall -W -pedantic yourprogam.c -o yourprogram -lm
Watchtower's suggestion tells you how to fix it, but I think it's nice that the compiler can give you a hint that there's a problem so you know where to look (in case Watchtower is not around when you wonder why you get the wrong answer from the program).
yourprogram.c: In function ‘main’:
yourprogram.c:9: warning: format ‘%f’ expects type ‘float *’, but argument 2 has type ‘double *’