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

basic question for fun . HOW TO FIGHT WITH TYPES OF VIRUS IN THE WORLD AND HOW GET RID FROM IT EXAMPLES: CORONA VIRUS, INFLUENZA, TYPHOID, HEPHATITISAND CHLOREA
Solve y = ax? + c for x. I-var- c
name 3 physiological processes of cell membrane?{3mks} plz help me guys
Solve y = ax? + c for x. I-var- c
round 1,965 to the nearest tenth
Which of the following is the correct chemical formula for Ca and F? CaF Ca2F CaF2
Can Someone please help - Write a diary about a person whose depressed and suicidal
What is CGS unit of weight ​
Which is true about the polynomial y2 – 3y + 12? It is a binomial with a degree of 2. It is a binomial with a degree of 3. It is a trinomial with a degree of 2.
Karim has two investments, one in Company A, and another in Company B. Karim purchased 3,000 shares in company A at $2.65 per share. Since purchasing the shares