#includedouble power(int x,int n){double y=1;int i;for(i=n;i
来源:学生作业帮 编辑:搜搜考试网作业帮 分类:综合作业 时间:2024/08/17 22:15:10
#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();
}
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](/uploads/image/z/5907998-38-8.jpg?t=%23includedouble+power%28int+x%2Cint+n%29%7Bdouble+y%3D1%3Bint+i%3Bfor%28i%3Dn%3Bi)
#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;
}
#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;
}
#includedouble power(int x,int n){double y=1;int i;for(i=n;i
#define N 20 fun(int a[],int n,int m) {int i; for(i=m;i>n;i-
#include int fun(int b[].int n) { int i.r=1:for(i=0:i
#define N 20 fun(int a[],int n,int m) { int i; for(i=m;i>=n;
void fun(int *a,int n) { int i,j,k,t; for(i=0;i
f(int b[ ],int m,int n) {int i,s=0; for (i=m;i
int fun (int n) {int m=0,f=1,i; for(i=0;i
Java里n =(int)Math.sqrt((double)i)是什么意思?
double f(double x); {double a=0;int i; for (i=0;i
#includedouble fun(double q){int n;double s,t;n=2;s=2.0;whil
int n=0,i; for(i=2;i
{ int i,n=0; for( i=2;i