ksdf.net
当前位置:首页>>关于求1/(1/10+1/11+1/12+1/13........+1/19)的整数部分的资料>>

求1/(1/10+1/11+1/12+1/13........+1/19)的整数部分

整数部分是 0

1/12*13+1/13*14+.+1/19*20 =(1/12-1/13)+(1/13-1/14)+。。。+(1/19-1/20) =1/12-1/20 =(5-3)/60 =1/30

1/10×11+1/11×12+1/12×13+...+1/20×21 =(1/10-1/11)+(1/11-1/12)+(1/12-1/13)+...+(1/20-1/21) =1/10-1/11+1/11-1/12+1/12-1/13+...+1/20-1/21 =1/10-1/21 =11/210 裂项相消法。

#include #include int main(void) { double eps,item,s; int x,y; s=0.0; x=1; y=1; item=1.0; printf("Input eps: "); scanf("%lf",&eps); while(fabs(item)>=eps){ item=x*1.0/y; s+=item; printf("%f ",s); x=-x; y+=3; } printf("s=%.6f\n"...

1/2+1/2^2+ +1/3+1/3^2+ ..... +1/p+1/p^2+ ..... p为质数

2004能被2,3,4,6,12整除,所以可以不考虑1/2,1/3,1/4,1/6,1/12 2004除以5,8,10是有限小数,所以也可以不考虑1/5,1/8,1/10 2004/7=286.285714285714,是一个6位的循环,小数点后第2004位,2005位是42 2004/9=222,666是一个1位的循环...

#include "stdio.h" #include "conio.h" void main() { int i,k=1; float sum=0,sum1; for(i=1;i

#include int main() {int i; float s=1.0; for(i=2;i

1/7-1/11=4/7×11 1/11-1/15=4/11×15 所以 1/7×11=1/4 × (1/7-1/11) 以此类推 原式=1/4 ×【(1/7-1/11)+(1/11-1/15)+(1/15-1/19)+……+(1/51-1/55)】 =1/4 × (1/7-1/55) =1/4 × (48/385) =12/385

public class MyPi {public static void main(String[] args) {// TODO Auto-generated method stubint max = 1000;double item = 0;double sum = 0;int flag = -1;for (int n = 0; n

网站首页 | 网站地图
All rights reserved Powered by www.ksdf.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com