#include <math.h>
#include <stdio.h>
float Fact(int x) {
if (x == 1 || x == 0)
return 1;
else
return x * Fact(x - 1);
}
int main() {
float c;
float d;
float y;
for(int n = 0; n < 10; n++) {
c = 3 * (pow(n, n));
y = Fact(n);
d = y / c;
printf("Result: %f", d);
}
}
FAILED: untitled1
: && /usr/bin/cc -g CMakeFiles/untitled1.dir/main.c.o -o untitled1 && :
/usr/bin/ld: CMakeFiles/untitled1.dir/main.c.o: in function `main':
/home/unoiko/CLionProjects/untitled1/main.c:16: undefined reference to `pow'
collect2: error: ld returned 1 exit status
ninja: build stopped: subcommand failed.
Don't know where misstake