发布网友 发布时间:2022-04-23 14:04
共1个回答
热心网友 时间:2023-07-30 14:47
举个例子:
#include <stdio.h>
double f(double x,int n)
{
if (n==0)
return 1;
else
return(x*f(x,n-1));
}
int main(void)
{
double x;
int n;
printf("请输入x,n:\n");
scanf("%lf,%d",&x,&n);
printf("%lf\n",f(x,n));
return 0;
}