Westonci.ca is your go-to source for answers, with a community ready to provide accurate and timely information. Discover detailed solutions to your questions from a wide network of experts on our comprehensive Q&A platform. Connect with a community of professionals ready to help you find accurate solutions to your questions quickly and efficiently.

JAVA
Write a program to find the sum of the given series:
S = 1 + (1*2) + (1*2*3) + --------- to 10 terms.

plz help....​


Sagot :

public class MyClass {

   public static void main(String args[]) {

     int x = 1;

     int total = 0;

     for (int i = 1; i <= 10; i++){

         x *= i;

         total += x;

     }

     System.out.println(total);

   }

}

This program finds the sum of that series to the tenth term, the sum is: 4037913. I hope this helps.