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

There were 13 original states. Name three.
When an excited electron in an atom moves to the ground state, the electron (1) absorbs energy as it moves to a higher energy state (2) absorbs energy as it mov
What would be the cost to each person in the United States to build a Death Star if it's cost would be 9*10^14 dollars? Express your answer to one significant f
Solve for x. 6x - 2 = 5x - 7 - 3x
True or False? The segments below could form a triangle. A________C is 9 C_____B is 4 B_______________A is 15
a horse moves a sleigh 1.00 kilometers by applying a horizontal 2000 Newton force on its harness for 45 minutes. what is the power of the horse?
Who is in charge of the executive branch?
Name two national U.S. holidays
What group of people was taken to America and sold as slaves?
Which compound yields H + ions as the only positive ions in an aqueous solution? (1) KOH (3) CH3OH (2) NaOH (4) CH3COOH