I am trying to find the the ceil of a variable which was been assigned a value but when I pass the function ceil("variable name") it throws an error.
#include <stdio.h>
#include <math.h>
int main()
{
double num = 8.33;
int result;
result = ceil(num);
printf("Ceiling integer of %.2f = %d", num, result);
return 0;
}
And the error which I am gettin is--
/usr/bin/ld: /tmp/ccG3j9iB.o: in function `main':
maximumRebounding.c:(.text+0x1f): undefined reference to `ceil'
collect2: error: ld returned 1 exit status