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

According to the following reaction, how much energy is required to decompose 55.0 kg of Fe3O4? The molar mass of Fe3O4 is 231.55 g mol-1. Fe3O4(s) → 3Fe(s) + 2
Why did Liberal Republicans split with the Radicals in 1872? A. The Liberal Republicans wanted to focus on issues of the economy and trade, while Radicals rema
Choose one of the most important philosophical or religious systems that influenced society in tang and song China during the postclassical era. Explain how th
Help needed! Can I get some help with two questions?
When peter was three years old, he was clawed very badly by the neighbor's cat. today, peter is afraid of all small animals, including rabbits and puppies. pete
is physical science and physics the same? If I pick physics courses and they gave me physical science is it the same?
What’s the correct answer
What is an example of tone in Night by Elie Wiesel?
How do the diffuse modulatory and point-to-point synaptic communication systems in the brain differ? list four ways?
Select all that apply