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

Why is it important that alveoli are only one cell layer thick?
One similarity between the reign of terror during the french revolution and the cultural revolution in china was that both
When reading the volume of fluid in a graduated cylinder, the eye should be _______?
what might have been the advantages and disadvantages of the santa fe trail in the 1800s
the center of a circle is at (-2, -7) and it's radius is 36 what is the equation of the circle in graphing form
you can get an std from a seemingly healthy person. true or false
I’d be great if I got some help
How does this passage add tension to the play? A.Macbeth knows that Lady Macbeth thinks they should kill more people to hide their secret. B.The audience know
What protist move by means of many short hair-like projections?
Which of the following fields is considered to be in allied health.