Write a program to generate the following series.
( 1 ) (1+2)2+ (1+2+3)3+(1+2+3+4)4+…….(1+2+3+……..+n)n
(2) SUM=(1)+(1+2)+(1+2+3)+(1+2+3+4)…n
(3) SUM=1/1!+2/2!+3/3!+4/4!+5/5!....n
Answers
Answered by
2
Answer:
(1+2+3) + (1+2+3+4) + …… + (1+2+3+4+…+n)
Given the value of n, we need to find the sum of the series where i-th term is sum of first i natural numbers.
Examples :
Input : n = 5
Output : 35
Explanation :
(1) + (1+2) + (1+2+3) + (1+2+3+4) + (1+2+3+4+5) = 35
Input : n = 10
Output : 220
Explanation :
(1) + (1+2) + (1+2+3) + .... +(1+2+3+4+.
Answered by
1
Answer:
// C++ program to calculate the following series
#include <bits/stdc++.h>
using namespace std;
// Function to calculate the following series
double Series(int n)
{
Similar questions
Environmental Sciences,
29 days ago
Biology,
2 months ago
Science,
9 months ago
English,
9 months ago
Math,
9 months ago