摘要: /* Date: 07/03/19 21:10 Description: 主要是闰年的判断和2月份的天数的处理 */ 1 #include<stdio.h> 2 int sumday(int month,int day); 3 int leap(int year); 4 int main(void) 阅读全文
posted @ 2019-03-07 21:32 sinlearn 阅读(296) 评论(0) 推荐(0) 编辑
摘要: /* Date: 07/03/19 19:27 Description: 选择排序、折半查找、函数的综合应用 */ 1 #include<stdio.h> 2 #include<string.h> 3 #define N 10 4 //函数声明部分 5 6 void input(int [],cha 阅读全文
posted @ 2019-03-07 20:35 sinlearn 阅读(217) 评论(0) 推荐(0) 编辑
摘要: /* Date: 07/03/19 15:40 Description: 用牛顿迭代法求下面方程在1附近的近视根 f(x)=a*x*x*x+b*x*x+c*x+d=0 x1=x0-f(x)/f'(x)*/ 1 #include<stdio.h> 2 #include<math.h> 3 float 阅读全文
posted @ 2019-03-07 16:19 sinlearn 阅读(640) 评论(0) 推荐(0) 编辑
摘要: /* Date: 07/03/19 15:40 Description: 用递归法求n阶勒让德多项式的值 { 1 n=0 Pn(x)= { x n=1 { ((2n-1).x-Pn-1(x)-(n-1).Pn-2(x)/n n>=1 */ #include<stdio.h> float Legend 阅读全文
posted @ 2019-03-07 16:14 sinlearn 阅读(1700) 评论(0) 推荐(0) 编辑