这两端代码都出现什么问题了
1.#include <stdio.h>void main(void)
{
int x,n,s;
s=power(x;n)
}
power(y)
{
int i,p=1;
for(i=1;i<=n;++i)
p=p*y;
};
2.#include <stdio.h>
int power(int,int);
int main(void)
{
int power(int x,int n);
int x=2,n=4;
printf("\ns=%d",power(x,n));
}
int power(int x,int n)
{
int i,p=1;
for(i=1;i<=n;++i)
p=p*x;
return(p);
}