#include <stdio.h>
#include <math.h>
int main()
{
float a=1,b=2,n,i,m,sum=0;
for (i = 1; i <=20; i++)
{
n =b/a;
m = a + b;
a = b;
b = m;
sum += n;
printf("%f %f %f %f %f\n", a, b,n,m,sum);
}
return 0;
}
标签:...,include,20,int,sum,main From: https://blog.51cto.com/u_16336886/8561892