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

why did the framers give the power to congress rather than to the states?
If 3x – 10 = 17, what is the value of 6x + 20 ?
What is the main difference between the right side and left side of the heart?
On average Exante Express trains are 50km/hr faster than Paral passenger trains. A Paral passenger train requires 60% more time then Exante train to travel 1800
Hitler intended to defeat great Britain by
Which sign is the less sign and which one is the greater sign (can someone please tell me I really need help! and I never understand the signs!) is this greater
type the requested verb form of this verb. future progressive tense: soar
Find the distance between two parallel lines: x = 11 and x = 5.
Which decimal is equivalent to 3/8?
Okay so I have three tests tomorrow. Haven't even started studying for two of them (Literature and History) but I already know science. How do you all learn 40