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

How can i comment to someones answer, from my iPhone???
2x+3=15 Subtract 3 from each side. Divide each side by 2. Am I right?
WHY DO WE GET TAUGHT SPANISH IN SCHOOL?
If prices rise but income stays the same, what is the effect on the quantity demanded? a. quantity demanded increases. b. fewer goods are bought. c. more goo
The formal duties assigned to the vice president by the constitution are a. to provide advice to the president on issues of national security and economic poli
the carson family paid $192 for two adult and three youth tickets to an amusement park. at the same park, the davis family paid $148 for one adult and four yout
how could the following sentence be rewritten as an exclamatory sentence? get out of the kitchen. are you going to get out of the kitchen? you should get out of
Why was newt Gingrich a significant political figure in the 1900s
How can specialization benefit an economy? a. it stops unemployment. b. it makes production more efficient. c. it leads to competition. d. it makes labor ea
Which Supreme Court decision was rendered invalid by the landmark civil rights case Brown v. Board of Education?