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

Aiden has $15.00 on his copy card. Each time he uses the card to make a photocopy, $0.06 is deducted from his card. Aiden wants to be sure that there will be at
1. Which of the following would be an illegal form of taxation based upon the Equal Protection Clause of the Fourteenth amendment? A. Taxing cigarettes B. Taxi
Replace the direct object with the correct direct object pronoun.ana lee un libro en la biblioteca. a.ana los lee en la biblioteca. b.ana lee la en la bibliotec
Why shouldn't juveniles be tried as adults?
Reduce it please!!!!!!
France's imperialistic manuevers focused on Indochina due to
How much power does an electric device use if the current is 36.0 amps and the resistance is 3.9 ohms? A.140 watts B.5,100 watts C.550 watts D.9.2 watts
Which type of exercise strengthens the skeletal and the cardiac muscles?
How do I solve this?
The circulatory system keeps the body and its tissues continuously oxygenated. It does this by having A) veins to carry both oxygenated blood to the tissues an