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 is below here ⬇️ :D
What is the slope of 0,14 and -2,3
How are meanders formed, refer to pool and rifle sequences
Evaluate the expression 3 4/5 x − 2 1/2 for x = − 10
What is 17.4% of 8350
what is the volume in liters of 3.24 kg of ethylene glycol
list out any 10 examples of movement which are taking place in very high speed?answer me correctly and give 10 examples if you do it I will mark you as brainlis
Why is it a negative thing for Hammurabi to claim that the laws cannot be changed in his kingdom?)
The dot plot shows the ages in years of some children at the park what percentage of children are younger than 7 years old?​
PLEASE ANSWER ASAP!! When there is no change of subject in the sentence, we don't use a subordinate clause; instead, some of the conjunctions are modified to b