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 type of Symbiotic Relationship is represented . (Barnacle & Whale)
What battle eliminated Persian influence in Greece and Athens?
Is the equations of quadratic number pattern will always have real roots
Simplify -5/4 divided by 2 and 3/5= PLEASE HELP ME
At 27.00 °c a gas has a volume of 6.00 L . What will the volume be at 150.0 °c
What is the theme of the tortoise and the hare?
if jacob used 1/7 of a liter of water to fill 1/9 of a fish aquarium how many liters are needed to fill the aquarium
Plot, character, and setting do not affect one another. a. True b. False
What type of organism is a pillbug and where do they live?
what ratios that are equivalent to 4 to 7. 5/8 12/20 8:14 5 to 10 16/28 9 to 16