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

PLEASEEEEEEE help me with this
Please can someone help me with the answer to this puzzle. (A large rock has been perched on the side of a mountain for many years.) What change would it make i
Please help The area of a square piece of tissue paper is 2,500 square centimeters. How long is each side? centimeters
Describe the role of proteins in living things.
here are approximately 4.2 million births in a country each year. Find the birth rate in units of births per minute.
Plzzzz,help me with this questions and 2 reasons Why???
why are the constitution frequently changing explain any 4 reasons ​
How to do this question
help me plsssssssss. ​
answer this question to cheek you knowledge