suzen123
suzen123 suzen123
  • 04-01-2021
  • Computers and Technology
contestada

JAVA

Write a program to display the first ten terms of the series:
5, 10, 17, --------------​

Respuesta :

tonb
tonb tonb
  • 04-01-2021

Answer:

class Main {  

 public static void main(String args[]) {

   int a = 5;

   int delta = 5;

   for(int i=0; i<10; i++) {

       System.out.printf("%d, ", a);

       a += delta;

       delta += 2;

   }

 }

}

Answer Link

Otras preguntas

How much energy is contained in the mass of a 60-kilogram person?
A rectangle whose perimeter is 80 m has an area of 384 m^2. Find the dimensions of the rectangle.
Give all solutions if the nonlinear system of equations, including those with no real complex components. y=x^2+6x 4x-y=-24
Suppose x + y = 6 and xy = 4. Find the value of x² y + xy² without solving the equations.
Which geographic factor was most significant in helping the soviet union withstand german attacks in world war 2
shayla says that one kilometer is equal to one million millimeters. is She correct? explain why?
how do i change a trapezoid into a rectangle
A swimming pool  20 m long and 10 m wide is surrounded by a deck of uniform width. The total area of the swimming pool and the deck is 704 m^2. Find the width o
When the following is balanced, C₄H₁₀ + O₂ → CO₂ + H₂O, what is the coefficient of CO₂? a. 2 b. 4 c. 8 d. 10 e. 13
What was the purpose of the pure food and drug act of 1906?