0
3.1kviews
Write a program to calculate sum of series:

½ - ¾ + 5/6 – 7/8 …….up to n terms.

1 Answer
0
172views

Algorithm:

  • Start.

  • Declare variables i, j and Sum.

  • Read values of numbers.

  • Set i = 1 and j = 1.

  • Increment i and set j = j + 2.

  • Add numbers and assign the result to sum.

  • Sum = Sum + (float)(j)/(j+2) – (float)(j)/(j+1).

  • Display sum.

  • Stop.

Program:

#include<stdio.h>
#include<conio.h> …

Create a free account to keep reading this post.

and 5 others joined a min ago.

Please log in to add an answer.