#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char **argv) {
int one = atoi(argv[1]);
int two = atoi(argv[2]);
int finally;
finally = func(one,two);
printf("%d",finally);
return 0;
}
int func(int first,int second) {
int counter = 0;
int new = first;
while (counter != second)
new = new*first;
counter += 1;
return new;
}
Im very new to coding so a lot of this might look like nonsense, So this code is a complicated way of using the power arithmetic operation,5*3 == 125, so if i type (./a.out 5 3) it should give out 125, i seem to get this error
extension.c:15:19: warning: implicit declaration of function 'func' is invalid
in C99 [-Wimplicit-function-declaration]
finally = func(one,two);
^
1 warning generated.