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

How can the use of new technology in industry benefit workers?
How does the neighborhood one calls home affect a poor person's life chances? how does the study "moving to opportunity" add to our understanding of poverty?
A submarine descends at a rate of 2.6 kilometers per hour. If the ocean floor is 6.24 kilometers below sea level, how long will it take the submarine to descend
Valence is the number of electrons and atom must gain or lose it ordered to its outer energy level or have a stable octet
Simplify. Question is in the picture.
What does freak tell max about his father leaving after he was born
what is an comparison between two things to make information easier for an audience to understand? A. Memo B. Document C. Instruction D. Analogy
an architect is designing a bridge that will be 24 yards 1.5 ft long how long will the bridge be in meters and centimeters
Factorize -5x - 5yPlease show full and correct working!!!!!!
(3)4+5 what is this answer I need to find it