摘要: 难点在于浮点值的计算,分两步,第一步将乘除结构用float变量保存,第二步再累计。 float--》%f;double--》%lf;char--》%c;char[]--》%s /* 计算:t=1-1/(2*2)-1/(3*3)-....-1/(m*m); */ #include <stdio.h> 阅读全文
posted @ 2019-11-15 21:38 dreamy_java 阅读(766) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include<string.h> void func(int a[],int n){ int temp,i,j; i=0; j=n-1; temp=a[0]; while(i<j){ while(j>i&&a[j]>=temp){ j--; } a[i]=a 阅读全文
posted @ 2019-11-15 14:55 dreamy_java 阅读(1372) 评论(0) 推荐(0) 编辑