Find the sum of series 1+(1+2) + (1+2+3) +… (1+2+3+…n)

Find the sum of series 1+(1+2) + (1+2+3) +… (1+2+3+…n)

In this program you will learn to create the 1+(1+2) + (1+2+3) +… (1+2+3+…n) sum of series using java programming.

Program code to Find the sum of series

Output

C:\CodeRevise\java>javac SumofSeries1.java

C:\CodeRevise\java>java SumofSeries1
Input the value of n : 4
Sum of series is :20

C:\CodeRevise\java>java SumofSeries1
Input the value of n : 8
Sum of series is :120

 

 

Check out our other Java Programming Examples

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top