What's wrong in this simple code ?


#include<math.h>
#include<stdio.h>
#define pi 3.1406
#define max 180
int main()
{
int angle;
float x,y;
angle=0;
printf(" Angle cos(angle)\n\n");
while(angle<=max)
{
x=(pi/max)*angle;
y= cos(x);
printf("%15d %13.4f\n",angle,y);
angle=angle+10;
}
return 0;
}


Error is
cc first.c
/tmp/ccrCUfIm.o: In function `main':
first.c.text+0x3b): undefined reference to `cos'
collect2: ld returned 1 exit status

Any ideas ?