#include <stdio.h>
#include <math.h>
void main()
{
int i, diff, sum = 0, num1 = 6, num2 = 2;
for(i = 0; i <= 4; i++)
{
diff = num1 - num2;
sum += pow(diff, i);
}
printf("%d", sum);
}
Whenever I am trying to execute this program, an error message just pops up saying:
In function
main
:
undefined reference topow
.
What am I missing here?