i don't understand what is wrong with my code it needs to have parameters and return, in c++
#include <bits/stdc++.h>
int p(int,int);
int main() {
int a,b,c;
scanf("%d",&a);
scanf("%d",&b);
printf("%d\n",c);
return 0;
}
int p(int a,int b){
int t,i,c=1;
for(i=1;i<=b;i++){
t=a;
c=c*t;
return t;
}
}
here's the input: 2 4
the output: 16