//10.
#include<stdio.h>
int main(void)
{
int a=1,i;
float sum=0,b=2.0;
for (i = 1; i <= 20; i++)
{
sum += b / a;
b += a;
a = b - a;
}
printf("sum=%f\n", sum);
return 0;
}
#include<stdio.h>
int main(void)
{
int a=1,i;
float sum=0,b=2.0;
for (i = 1; i <= 20; i++)
{
sum += b / a;
b += a;
a = b - a;
}
printf("sum=%f\n", sum);
return 0;
}