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

What comes after 100,81,64,49
A square patio has an area of 200 square feet. How long is each side of the patio to the nearest tenth?
What is one significant contribution from African Americans on American society and/or culture?
Two cars leave a town at the same time heading in opposite directions. One car is traveling 12 mph faster than the other. After 2 hours, they are 232 miles apar
Psychology question Jeremy grew up in an area where the land was flat. Sally grew up a large city with tall buildings. How may their depth perception be diffe
All living organisms are made from different combinations of only ___________ amino acids
is -4 5/12 a rational or irrational number?
Sid wrote 541,309 on his paper. Using words and numbers explain how the number would change if he switched the digits in the hundred thousands and tens place
Name three countries, from the north-east north-west and southern hemisphere, for the tundra biome
Moving up trophic levels there is an increase in energy, entropy, and biomass. True or False?