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

answer this for brainilest and 11 points
BRAINLIEST IF CORRECT Based off of what you have learned about regarding the Hundred Years' War, did the war do more to strengthen or weaken the power and infl
1/7 done! Starting off strong! Let’s try and keep it up!
lol please help me i really don’t get this
What is the major cause of air pollution?
how many minuets should you wait before exercisesing after you eat
Pretty pretty please help with my spanish <3 a. se hablan, b. se lastimó, c. se puede, d. se reciben, e. se sabe, f. se vende, g. se olvidaron 72. ¡La letra
Which level of cause involves relationships and interactions with other people?
Anu was born and raised in India. It is MOST LIKELY that Anu practices which religion? A. Confucianism B. Taoism C. Hinduism D. Shintoism
helpppppp plssssss lolll