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

An effect of the voyages of Columbus was that
the healing of wound in a human is most similar to the process of
Out of 6700 students of a school only 90% passed. Find how many students passed?
Which statement best describes the relationship of photosynthesis and energy? The process of photosynthesis is energy-storing because the process converts light
What is the pattern in the values as the exponents increase?
Which equation represents a line that is parallel to the line whose equation is 2x + 3y =12
Please, answer thank you
Solve the equation above 2x+18=7x-30
Viewers of Star Trek hear of an antimatter drive on the Starship Enterprise. One possibility for such a futuristic energy source is to store antimatter charged
During the competition for the title of Miss America 1961, five finalists were given two questions to answer. First they were asked what they would do if "you w