C语言旅途之函数的递归调用求px(x,n)

Ⅰ、简单的入门: ①、//代码摘下直接可以运行 //用递归求px(x,n)的值 #include<stdio.h> double px(double x,int n) { if(n==0) return 1; else return x*(1-px(x,n-1)); } int main() { printf(“please input the number of x,n\n”); int n;
相关文章
相关标签/搜索