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

True/False:- Q5.River valleys and terraces are ideal for cultivation of crops.
Need the answer,​ please!
please show working step by step for the two ​
1. Why did president Hoover call for an investigation into manipulative stock practices by the senate banking committee in early 1932? 2. Are these hearings goo
Find the difference. -7 - (-2) =
In QuickBooks Online, where do you go to see all a company's categories organized into account types?
When you login to your blogging account. The first screen with all controls, tools and functions is called .... Select one: a. Dashboard b. Templates c optians
How high did Joseph Kittinger get up into the atmosphere before he jumped?
To force Indians to leave their native lands, white men used OA. Manifest Destiny O B. the Indian Removal Act OC. the Indian Assimilation Act OD. the Dred Scott
Help mee please!!!! I have an exam