aiguo94
#include <stdio.h>
int main()
{
int i;
float a, b, c, s;
a = b = 1.0;
c = 0;
s = 0;
int N;
scanf("%d",&N);//这个是输入10,表示有10组测试数据
for(i = 0; i < N; i++)
{
c = a + b;
s = s + c / a;
//printf("%.0f/%.0f ", c, a);//这句可以输出那个分数列
b = a;
a = c;
}
printf("\n%.2f\n",s);
}