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

calculate the number of atoms in 24 grams of fef3
Tell me the ANSWER for the Area & Perimeter. BRANLIEST FOR A GREAT ANSWER!
which object has a greater interia a ping pong ball or baseball
How did King Ezana change life for the people of Axum? He declared Christianity to be the official religion. He declared polytheism to be the official religion.
China's massive and rapid industrialization since the 1990s has resulted in A) an end to the Communist Party. B) in increase health care conditions. C) a decr
Help me please,Thanks
CAN SOMEONE HELP ME PLEASE IN - Art and the Creative Impulse ?? 16. A more saturated color has a heavier A. scale set. B. value weight. C. texture. D. tone. 17.
What are 7 facts about Conduction?
I need help with this problem.
Why do some historians say Alexander the great doesn't deserve his name in other why isn't he great