Whenever i run this code(on linux terminal):
I always get this error:
whats the problem with my code? please help..
Code:
#include <stdio.h>
#include <math.h>
int main()
{
double x,y;
printf ("enter the angle between the two sides(in radians): \n");
scanf ("%lf",&x);
y= cos(x);
printf ("the cosine of the angle is: %lf\n",y);
return 0;
}
Code:
/tmp/cckIyjg6.o: In function `main': CosineRule.c:(.text+0x33): undefined reference to `cos' collect2: ld returned 1 exit status
Comment