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

In general terms, it can be said that Islamic society was more violent than its contemporaries. was usually extremely intolerant toward Christians and Jews. rel
what is 7.3 x 10 to the 2nd power
Sketch the graph of each linear inequality greater sign has to have a line underneath it Y<-6/5x-1
integer problems that equal 36
__________ was the Roman General who conquered Gaul, then went on to march on Rome and make himself dictator for life until he was assassinated in the forum.
FACTORISE THESE REALLY STUCK 2X^2+5X+2 2W^2+5W-3 3A^2+14A+8 30Z^2-23z+2 8Y^2+23Y-3 6P^2-PWQ-Q^2
A line passes through (1,1) , (-2,4) , and (6,n) . Find the value of n.
A 32 oz bottle of fruit juice costs $6.72. What is the cost of the juice per ounce? $
Six grape fruit cost $5.34. How much does one grape fruit cost????
Why is honesty especially important in a scientist when the results of an experiment go against predictions❓❔