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

a(n+y)=10y+32 solve for y
Define and give an Example of each: Potential energy Kinetic energy and Inertia help please thank you))))))
The phase of cell division during which the chromatids are pulled apart and move to the opposite
Your friend comments that the bright star must give off much more light than the dimmer star. Is he necessarily right?
What was Dan Cody’s flaw? How might this relate to Gatsby? What did Dan leave Gatsby? What happened?
(04.04) Which of the following has a graph that is a straight line? (4 points) Equation 1: y = 4x3 + 6 Equation 2: y = 5x − 4.5 Equation 3: y2 = x − 1 Equ
Out of 28 students in a class, 7 have blue eyes. What is the probability a student picked at random from the class does NOT have blue eyes? A) 1/4 B) 3/4 C) 1/7
The mayan civilization accomplished many things, including ______.
What is ^-112[tex] \sqrt{ - 112} [/tex]
Poland’s energy resources can be described as _____. a. based on large deposits of coal b. rich in petroleum c. large deposits of sulfur d. large