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

Solve each equation. |x+5|=-3
Five times a number decreased by 2 is 4, find the number.
Solve each equation. |x+5|=-3
a service station on the interstate changes $2.29 per gallon of gasoline and $1.89 per quart for oil. What would be a recourable amount to pay for 10 gallons of
A 16.0 kg canoe moving to the left at 10 m/s makes a head-on collision with a 19.0 kg raft moving to the right at 7.0 m/s. After the collision, the canoe moves
Consider the following inequality: −2(2z−3)≥2z+24 Step 1 of 2 : Write the solution using interval notation.
All are true about the American Revolution EXCEPT Many soldiers died from cold and disease at Valley Forge. The colonists did not receive any foreign aid during
In the diagram of a gate, the horizontal bars are parallel and the vertical bars are parallel. Find x and y. Complete the explanation Indicating which postulate
373646351636646475753626266374747574884x848484893990299149440505944330309877=?
Maria is going to purchase cranberry juice and lemon-lime soda for a new fruit punch recipe. The recipe calls for 3.5 times as many bottles of lemon-lime soda a