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

Compared to a 26-gram sample of NaCl(s) at STP, a 52-gram sample of NaCl(s) at STP has(1) a different density(2) a different gram-formula mass(3) the same chem
What are the functions of spirogyra?
The Panama Canal cuts through
how did Romans learn the written language
What were the motives behind European exploration in the 1400s? Explain
The last great German counteroffensive of the war was called _____. the Battle of Britain the Battle of the Bulge the Battle of Ardennes Forest the Battle of No
If f(x)=2x+5 and g(x)3x3rd power +2x+4 what if f(g(2))
Which polyatomic ion contains the greatest number of oxygen atoms? (1) acetate (3) hydroxide (2) carbonate (4) peroxide
List three important steps in the early development of life on Earth?
An Arrhenius acid has (1) only hydroxide ions in solution (2) only hydrogen ions in solution (3) hydrogen ions as the only positive ions in solution (4) hydroge