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

When someone throws a ball the action force is the person pushing on the ball. What is the reaction force?
what are 3 main points to use for writing a paper on texting and driving
can you plz help i don't understand
Which revision would make the following sentence correct? Karen is a powerful singer, she always touches the men, women, and children who hear her. A.Karen
It's number 6?its really hard me and my friends have tried but we just don't know.
Which equation represents a proportional relationship that has a constant of proportionality equal to –10? a) y=x-10 b) Y= X - -10 c) y= -1
What does 3 dots inside a silver ring mean??
What did the writings of ptolemy and archimedes make obvious?
The lonely deer was quietly nibbling grass. What type of level of organization would this be?Organism,Population,Community,Ecosystem,Biome?
What is measurement of polygon