suzen123
suzen123 suzen123
  • 04-01-2021
  • Computers and Technology
contestada

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

plz help....​

Respuesta :

Cytokine
Cytokine Cytokine
  • 04-01-2021

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.

Answer Link

Otras preguntas

Name the Quadrilateral x = 36 3x+11 3x+11 2x+47 X+83
The molar concentration of NO3− ions in a 0.054 M solution of Ca(NO3)2 is ______
Moe, Joe, and Hiram are brothers. One​ day, in some​ haste, they left home with each one wearing the glassesglasses and coatcoat of one of the others. JoeJoe wa
Which one replace the question mark?​
please answer this need help​
WILL GIVE BRAINLIEST FOR QUICK ANSWERS!! I RATE WELL FOR GOOD ANSWERS!!
Silver, gold, platinum, are ferrous metals. TRUE OR FALSE
The Antarctic Treaty divides the continent into how many zones? 1) Four 2) Six 3) Eight 4) Ten
True or False: Coastal Tribes such as the Makah, hunted sea mammals. * 1 point True False Which statement best describes how Native Americans provided food for
Another example of axiom 3 math grade 8