#include<stdio.h>
int main(){
double sum=0,x1=1,x2=2,x3;
int i;
for(i=1;i<=20;i++)
{
sum=sum+(x2/x1);
x3=x2;
x2=x1+x2;
x1=x3;
}
printf("%f\n",sum);
return 0;
}
#include<stdio.h>
int main(){
double sum=0,x1=1,x2=2,x3;
int i;
for(i=1;i<=20;i++)
{
sum=sum+(x2/x1);
x3=x2;
x2=x1+x2;
x1=x3;
}
printf("%f\n",sum);
return 0;
}
>