this program called ma.c is simply trying to output: 2 raise toCode:#include <stdio.h> #include <math.h> main () int a=2;int b=5; int c; c = pow(a,b); printf("%d to the power of %d is equal to %d\n",a,b,c); }
the power of 5, but i get this compilation error below, can anyone tell me what did i missed here, im new to c programming.
bt ~ $ gcc -o ma ma.c
/tmp/cck7y346.o(.text+0x3f): In function `main':
: undefined reference to `pow'
collect2: ld returned 1 exit status