#include <stdio.h>
void main()
{
float sum;
int div,dived,tmp;
dived=2;
div=1;
int i;
sum=0;
i=1;
while(i<=20)
{
sum=sum+(float)dived/(float)div;
tmp=div;
div=dived;
dived=dived+tmp;
i++;
}
printf("the sum is %f",sum);
}
void main()
{
float sum;
int div,dived,tmp;
dived=2;
div=1;
int i;
sum=0;
i=1;
while(i<=20)
{
sum=sum+(float)dived/(float)div;
tmp=div;
div=dived;
dived=dived+tmp;
i++;
}
printf("the sum is %f",sum);
}