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

Help me expand Expand 2a(a+7)
How was the rise of the Japanese empire and the fall of the ottoman empire significant in leading the world towards World War II?
Before becoming an empire, the Romans established a republic. What was this? A. rule by a family line B. a form of representative government C. rule by a div
1) All cars are blue. (2) All pigs have wings. Therefore, (3) All buses have three wheels. Question 2 options: Passes the true premises test and passes the prop
Antonio and Addie want to know if perfume fumes affect plant height. They place five identical bean plants in five identical light boxes. In four of the boxes,
A person with a mass of 105 kg moves at a velocity of 1.5 m/s what is this person momentum?
solve the equation : y+5=29​
Why is taxation necessary? O A. To enable government planning of the economy O B. To prevent a regressive method of production c. To provide money for governmen
Simplify the expression: (-1 + 3x)(4.9) =
Two friends are playing the same games on their phones. One is already on level 6, and levels up two hours. Her friend is on level 3, but levels up every 60 min