#includedouble power(int x,int n){double y=1;int i;for(i=n;i>1;i--)y*=x;}main(){ double power(int x,int n);int x,n;printf("input x&n:\n");scanf("%d%d",&x,&n);printf("power(%d,%d)=%ld",x,n,power(x,n));getch();}

来源:学生作业帮助网 编辑:作业帮 时间:2024/07/04 22:16:29
#includedouble power(int x,int n){double y=1;int i;for(i=n;i>1;i--)y*=x;}main(){ double power(int x,int n);int x,n;printf(
xRn0 DTeׅ%PnR@U}Yʶn yٯ4ՃphUbes }22z+xع\W(F~y5l7E<`d)姦Idʲe؈dDRAZX@]D)U}S~)vUa9V!DbxAQWQ 0-c`y޽q%Iڷŭ{,$ӵ!)N/  WןG-N[Nb

#includedouble power(int x,int n){double y=1;int i;for(i=n;i>1;i--)y*=x;}main(){ double power(int x,int n);int x,n;printf("input x&n:\n");scanf("%d%d",&x,&n);printf("power(%d,%d)=%ld",x,n,power(x,n));getch();}
#include
double power(int x,int n)
{double y=1;
int i;
for(i=n;i>1;i--)
y*=x;
}
main()
{ double power(int x,int n);
int x,n;
printf("input x&n:\n");
scanf("%d%d",&x,&n);
printf("power(%d,%d)=%ld",x,n,power(x,n));
getch();
}

#includedouble power(int x,int n){double y=1;int i;for(i=n;i>1;i--)y*=x;}main(){ double power(int x,int n);int x,n;printf("input x&n:\n");scanf("%d%d",&x,&n);printf("power(%d,%d)=%ld",x,n,power(x,n));getch();}
#include
#include
int power(int x,int n)
{
int y=1;
int i=0;
for(i=n;i>0;i--)
y*=x;
return y;
}
int main()
{
int x=0,n=0;
printf("input x&n:\n");
scanf("%d%d",&x,&n);
printf("power(%d,%d)=%d",x,n,power(x,n));
getch();
return 0;
}