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

Big Canyon Enterprises has bonds on the market making annual payments, with 12 years to maturity, a par value of $1,000, and a price of $1,030. At this price, t
g(x)=2x^2-1-8 , what is the answer ?
which of the following was not invented from the industrial revolution
How many distinguishable 7 letter​ "words" can be formed using the letters in ALABAMA​?
i need information about albania after world war II (1945-1946)
Which of the following statements best describes a theme of the text the story ?
Why are mimicry and camouflage and example of an adaptation?
100 points! Please write 10 facts about how the Great Depression effected the economy
In Switzerland, what does a family do to announce the birth of a child?
The Backwoods American company operates a telephone order system for a catalogue of its outdoor clothing prod- ucts. The catalogue orders are processed in three