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

What is the value of 56 tens?
Which ratios are proportional to 6/8? (More then one answer) A. 3/4 B. 16/18 C. 36/48 D. 42/56
What is the complementary dna sequence to 5′ atgcttgactg 3′?
the rain has began. change this sentence into simple present tense quick
Use the figure to answer questions 4-5. Assume that lines JL and MP are parallel. 4. Name a pair of same-side interior angles. ∠1 and ∠6 ∠1 an
can someone help me with creating a thesis statement about how the american and french revolutions differ and relate.
Rhetorical devices are techniques used to distract the reader from the main purpose of the text. True False
Let f ( ) sin(arctan ) x x = . What is the range of f ?
How do you identify equivalent ratios
"Hola. Me llamo Maria. Estudio en el Colegio Cervantes. Me gusta la clase de ciencias porque es facil. No me gusta la clase de espanol porque es dificil. Los pr