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

HIT OR MISS?????? What is the answer
Which effect does an increase in a country’s literacy rate have on the people who live there?
What is the solution to the inequality? 6x−5>−29, ​a x>−4 ​ ​ bx>4 ​ ​ cx<4 ​ ​ dx<−4 ​
what are the differences and similarities between RGB and CMYK
Which thirteenth century group invaded Russia, leveling cities and massacring whole populations?
WILL GIVE BRAINLIEST!! Find an equivalent function to f(x)=5(2)^3x. The 5(2)^3x means 5(2) to the 3x power Answer choices: A: f(x)=125^x(8)^x B: f(x)=10^2
why is carbon stable
how did locke describe "the state of nature ?
Can someone help me help my sister? She is in third grade. 50 points and brainlist! Ones that are not answered. Plz and thx!
The gravitational attraction between two objects will ___ if one object acquires more mass .