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

literal equation R=R1+R2 for R2
Any potentially harmful substance that humans add to an ecosystem A) is called pollution. B) might cause acid rain. C) is always a carcinogen. Eliminate D) h
how can changing improper fractions to mixed numbers help me determine between which two whole numbers a fraction lies
Which team has represented the AFC in the Super Bowl the most times?
what was unknown in europe before european explorers visited the americans
an airplane travels a distance of 42x^5y^4 miles in 6xy^2 hours. find the average speed of the plane
Which amendment resulted in U.S. senators being elected directly by the voting public? A.the 19th Amendment B.the 18th Amendment C.the 17th Amendment D.the 21st
Fern ir read 5/7 of the pages in his 98 page book.how many pages does he have left?
What arouses men more than any other scent in the world (according to the Smell & Taste Treatment and Research Foundation in Chicago)?
what r some facts about gymnosperms