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

You can rotate a selected graphic by dragging a ________ rotation handle
Which statements describe density? Check all that apply. 1-Density is a chemical property of an object. 2-The density of an object is constant 3-Density is a de
estimate the number of breaths taken by a person during 70 years
___ often cause the eye to become less responsive
$8.00 divided by 1/4
If u = <-7, 6> and v = <-4, 17>, which vector can be added to u + 3v to get the unit vector <1, 0> as the resultant vector?A. w = <18, -57&
Please help!! What is the quotient written in scientific notation? (7.488×10^−8)÷(3.12×10^2)
Simplify the expression g² - 6 + 6g² - 2 + h A) 7gh² - 8 B) 7g² - 8 + h C) 5g² - 8 + h D) 7g² - 8 Please explain and show work!!
Why did William Penn advertise his new colony of Pennsylvania in Europe? A-He wanted people to see it because it was so beautiful. B-It was the first English se
Select the correct text in the passage. Which sentence in this excerpt from The Mother's Recompense by Edith Wharton uses personification? With impatient finger