fact.c: In function ‘power’:
fact.c:6:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (int i=0;i<b;i++) res*=a;
^
fact.c:6:5: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
fact.c: In function ‘main’:
fact.c:21:5: error: ‘for’ loop initial declarations are only allowed in C99 or C11 mode
for (int i=0;i<=4;i++) if (i<=num) res+=power(pool[i],pw);
^
fact.c:15:5: warning: ignoring return value of ‘scanf’, declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",&num,&pw);
^