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

solving Algebraic Equations 2M+3=11
Billie Holiday sells children's clothing for Sara Vaughn's Toddler Shop. Baby blankets sell for $29.99 after a markup rate based on cost of 109%. Find the cost
which substances have the lowest melting points: ionic covalent, or metallic
plz hurry evaluate the expression a+b where a=8 and b=19
what is 2 3/4 + 5/9 answer
Find the condition that the zeros of the polynomial f(x) = x^3+3px^2+3px+r may be in A.P.
Which two hormones are known for their role in the fight-or-flight response? And are known for their role in the fight-or-flight response.
A square and an Equilateral triangle have the same perimeter. Each side the triangle is 4 inches longer than each side of the square. What is the perimeter of t
Which organisms have pharyngeal arches that develop from all three germ layers and go through the same development stages as embryos? 1.bird 2.ladybug 3.starfis
please can someone help me find the courses of stroke?