当前位置:网站首页>C language "Recursion Series": recursively realizing the n-th power of X

C language "Recursion Series": recursively realizing the n-th power of X

2022-06-25 08:29:00 zbossz

#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include<math.h>
float p(float x, int n)
{
    
	if (n == 0)
		x = 1;
	else
		x = p(x, n - 1) * x;
}
int main()
{
    
	printf("%f",p(2,8));
	return 0;
}

 Insert picture description here
 Insert picture description here

原网站

版权声明
本文为[zbossz]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202200556148253.html