Logic :-
As we can see the the dividend of the given series is increase by 3 each time and divisor is also increasing by 3 but divisor = dividend+1 so according to the series we can use for loop
Logic is Given Below .
for(i=0;i<n;++i)
{
x=a/(a+1);
sum+=x;
a+=3;
}
Output:
1/2+4/5+7/8+……'
Enter The Number of Terms
3
Sum = 2.175
need an explanation for this answer? contact us directly to get an explanation for this answer