摘要: #include <stdio.h> main() { float x=2.0,y=1.0,z=0.0,sum=0.0; int a; for(a=1;a<=20;a++) { sum=sum+x/y; z=x; x=x+y; y=z; } printf("%f",sum); getchar(); 阅读全文
posted @ 2021-10-06 21:15 myrj 阅读(129) 评论(0) 推荐(0) 编辑
摘要: #include <stdio.h> #include <math.h> main() { int s=0,a,n,i,m=0; //a=2,n=4; scanf("%d,%d",&a,&n); for(i=1;i<=n;i++) { m=pow(10,i-1)+m; //printf("%d\n" 阅读全文
posted @ 2021-10-06 20:10 myrj 阅读(626) 评论(0) 推荐(0) 编辑