For starters change the first line to:
Code:
#include <stdio.h>
#include <math.h>

int main(void){
...
then link in the math library. For gcc add "-lm" to link in the math library.