Computer Science, asked by arnavdixitclass9obje, 2 months ago

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 Anonymous
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 Xxitzking01xX
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