2-14
来源:互联网 发布:域名不备案可以解析吗 编辑:程序博客网 时间:2024/05/17 22:09
/* Note:Your choice is C IDE */
#include "stdio.h"
void main()
{
int n,a;
float sum,c,Z,M,z,m;
while(1)
{
Z=2;
M=1;
sum=2.0;
printf("please input n:\n");
scanf("%d",&n);
for(a=2;a<=n;a++)
{
m=M;
z=Z;
Z=m+z;
M=z;
c=(Z/M);
sum=sum+c;
}
printf("这是前%d项和:%f\n",n,sum);
}
#include "stdio.h"
void main()
{
int n,a;
float sum,c,Z,M,z,m;
while(1)
{
Z=2;
M=1;
sum=2.0;
printf("please input n:\n");
scanf("%d",&n);
for(a=2;a<=n;a++)
{
m=M;
z=Z;
Z=m+z;
M=z;
c=(Z/M);
sum=sum+c;
}
printf("这是前%d项和:%f\n",n,sum);
}
}
0 0
- 14-2
- 2-14
- 2-14
- 14-2
- 2/14-2/24
- 2011-2-14
- 2011 2-14
- 2 月14号
- Java(2012/2/14)
- 2月14日
- 14周任务2
- 14-2 成绩处理
- 14--5--2Fun
- 14周任务2
- 14--6--2字符串
- 14/2/26
- 14分析2
- 习题2—14
- 辛星浅析Linux中的anacron
- Ubuntu摆脱QQ版本过旧问题!安装 wine-international版 qq
- [LeetCode/LinkedIn] Integer to Roman and roman number to Integer
- 黑马程序员——Java面向对象编程学习总结
- [LinkedIn, LeetCode] given a log file, parse the valid ip addresses, no duplicate
- 2-14
- gdjfdsofods附近的说了句分离式的经费落实
- 第七讲:分支结构程序体验
- java资源收集
- Java学习之路(3)
- 挂起一个任务
- VIM使用技巧2
- 使用javascript写了一款BPO行业文字生成器
- 在csdn学院开了一门课 欢迎指教 谢谢