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

French Homework Fill in the blank with the correct conjugation of the verb in parenthesis: tu (lire) 1. lit 2. lirs 3. lis 4. lires
Can each set of line segments form a triangle? Why or why not? de= 0.205 kilometer ef= 0.01 kilometer df= 0.02 kilometer
Gila Monsters are one of two types of venomous lizards in the world. If you wanted to avoid coming across the Gila Monster when hiking in Arizona you would want
Write an expression that shows how to multiply 7 x 256 using the expanded form and the Distributive Property.
Who does Odysseus tell Athena he is?
So I'm not making this argument [requiring citizens to vote] in favor of any specific political party; I believe it will help us elect more effective and though
Bob bought a bike for $250 and repaired it . He can now sell the bike for $300. What is the percent increase in the value bike ?
In "What to the Slave is the Fourth of July?”, Douglass refers to the Declaration of Independence. Which of the following best describes the historical signific
300 30 3 0.3 follows what pattern
where are valence electrons located?