Computer Science, asked by siriltigga2747, 9 months ago

Write a program in c++ to calculate the sum of the following seriessum=1/2+2/3+3/4+.........+n/(n+1)​

Answers

Answered by hudanaeem20
1

Answer:

code:

Explanation:

#include <iostream>

using namespace std;

int main()

{

   int i, n, sum = 0;

   cout << "\n\n Find the sum of the series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + ... + (n*n):\n";

   cout << "------------------------------------------------------------------------------------\n";

   cout << " Input the value for nth term: ";

   cin >> n;

   for (i = 1; i <= n; i++)  

{

       sum += i * i;

       cout << i << "*" << i << " = " << i * i << endl;

   }

   cout << " The sum of the above series is: " << sum << endl;

}

Similar questions