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

Can someone please help me solve this using PEMDAS? I keep getting 14 but it's not on our answer sheet.
What came first? The chicken or the egg?
Which of the following is a negative effect of tourism in Central America and the caribbean
What is a transformer? Explain how a transformer works including specific details on step up and step down transformers
using mixed numbers whose sum is 1 3/5
A line segment is different from a line in that a segment has a. no endpoints. b. two endpoints. c. an undefined length. d. only one endpoint.
please helpppwhat is the value of x
Rewrite the following expression 15+21 using the GCF and the distributive property
15/24 in simplest form
Ross Bergen is considering a certain corner location for his sandwich shop if he Service people passing the corner at lunchtime which of the following questi