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

SOMEBODY PLEASE HELP ME I REALLY NEED IT
Park View Apartments has 2 buildings Each building has 3 floors Each floor has 16 windows What is the total number of windows in the Park View Apartment buildin
PLEASE HELP 3. Which statement supports the analogy "BLACK is an open umbrella" in "I Am a Black" "1:I am now an African-American." " 2:I am other than Hyphenat
i need help!! im struggling with this question
Describe two 'beneficial' aspects from the last 10,000 years of humanity, as well as two 'dis-advantageous' aspects. Agriculture should be your guiding point he
The saturation point for a solution is 250 grams of solute per 500 grams of solvent. If you pour 500 grams of solute into 800. grams of solvent, how many grams
how did colonization impact the foods produced in honduras​
find the surface area of the shape.
How can the us government control financial institutions? A. Voting on a new budget B.loaning money to state governments C.borrowing money from a foreign ban
does pizza go with ranch true or false?