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

Which of the following describes an outcome of Russification
The ____ contains the highest concentration of ozone
Algebra 1: Determine if 4, -1, -6, -11, -16, … is an Arithmetic Sequence. If it is, give the common difference.
i need help finding out what A circuit is?
How much times does 73 go into 141
Which of these adaptations would most directly assist a plant in reproducing?A.waxy leavesB.bright flowersC.thick stemsD.shallow roots
Who take over if the president and Vice President can't do there duties
Select Proportional or Not Proportional to correctly classify each pair of ratios. Proportional Not Proportional 12/30 and 18/45 O
Heather is saving for retirement and has been doing a lot of research on how much she should put aside each month. The newest article says that 1/36 of her sal
The process by which molecules diffuse across a membrane through protein channels is called?