摘要:
/* 求解n阶多项式的值,多项式公式如下: Pn(x) = 1 n=0; = x n = 1; = (2n - 1)xPn-1(x) - (n - 1)Pn-2(x) n>=2 */ #include <stdio.h> #include <stdlib.h> float Pn(int n,floa 阅读全文
posted @ 2021-09-25 21:28
叶梓渔
阅读(702)
评论(0)
推荐(0)
摘要:
/* 打印十行杨辉三角 */ #include <stdio.h> #include <stdlib.h> void printMatrix(int lines)//动态方式,动态生成存储输出杨辉三角 { // int matrix[10][10] = {0}; int *pMatrix = (in 阅读全文
posted @ 2021-09-25 21:27
叶梓渔
阅读(185)
评论(0)
推荐(0)
摘要:
/* 有一分数序列:2/1,3/2,5/3.8/5,13/8,'''求前20项之和 */ #include <stdio.h> #include <stdlib.h> double getSum(int n) { double fenzi = 2; double fenmu = 1; // int 阅读全文
posted @ 2021-09-25 19:51
叶梓渔
阅读(334)
评论(0)
推荐(0)

浙公网安备 33010602011771号