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

The progressive movement was characterized by: A-the belief that the United States should involve itself more actively in foreign affairs and become expansioni
which American Indian group was allied with the British as the French and Indian war began?
what is an energy riched compound needed by organisms?
Surface Integrals Prolbem? If the mass per unit area of a surface is given by ρ=xy, find the mass if S is the part of the cylinder x^2+z^2=25 which is in the fi
Using root words as clues, decide which word best completes this sentence. The__held his baton while the orchestra waited for his signal. a: biographer b: inven
How does an increase in the annual melt season in Antarctica have a global effect? a. It causes an increase in heat related illness and death. b. It causes the
elle can buy 2 quarts of milk for 3$ or 1 gallon milk for 3$ which is the better deal
Can you help with both
What divided by onehundred gives you 7200 the answer is what?
I'm not sure how to start. Can anyone help with a few letters? Once I get a start, I can finish