128. C Program to Compute the ½ + ¾ + 5/6 +……………………… + 99/100 series.
How does this program work?
- This program is used to compute the sum of series for the given order.
- Here we are going to find the series for½ + ¾ + 5/6 +……………………… + 99/100.
- Computing the given series is easy by Using the simple for loop condition.
Here is the code
#include <stdio.h>
int main()
{
float x=1.0;
float sum=0.0;
sum =(x/(1+x));
for(x=3;x<101;x++)
{
sum =sum+(x/(1+x));
x=x+1;
}
printf("The final sum of 1/2+3/4+5/6 ...+99/100: %f",sum);
return 0;
}