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

If you bend a straight chain of carbons, do you make a different structure? Why or why not?
Gregor Mendel’s research formed the basis of the field of genetics. dominance. recessiveness. selective breeding.
393 is three times as much as some number?
how does the slope of a road affects a persons driving
will enyone help me answer this question please
how many inches are in 13 and a half feet
write an equation in standard form for the line that passes through the points (4,5) and has a slope m= 2/3
Select three events from the list of five given below - one showing isolationism, one showing intervention, and one showing imperialism . Using complete sentenc
The strongest voice in shaping foreign policy belongs to __________.
In titanic, why was captain smith given command of the ship?