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

A school coach makes a journey of 320 km. How far is this in miles if 1 km is 5/8 mile? A. 198.75 miles B. 225 miles C. 250 miles D. 275 miles
please open the lead of the water bottle into passive
what is 1,256,893 times 234,985,029
importance of winter vacation ?​
Na is a cation, anion, or none? 1) cation 2) anion 3) none
For a ladder to be stable the angle that is makes with the ground should be no more than 78 degree and no less then 73 degrees. What are the minimum and maximum
How many years queen Elizabeth lived?
Describe the attitudes that Americans held in the 1920s based upon their actions towards the 18th amendment.
In teams with strong collaborative communication, team members always agree.
If the first term of a geometric progression is 16 and the 5th term is 9. Find the 7th term of the geometric progression