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

two identical freight cars roll without friction towards each other on a level track. one car rolls 2 m/s the other 1 m/s. after the cars collide they couple an
Solving systems by elimination: 2x + 4y = -4 3x + 5y = -3 Please show me your work so I can do the rest myself. Thanks!
What is Sir Francis Drake hardships
What two major processes are involved in the oxygen cycle?
What is the numerator or denominator of 4/5
How many minutes are in 36 hours?
Rewrite the function c(x) =9(x+3) using the distributive property
What is the numerator or denominator of 4/5
How is the numeral 35.012 written in words and why
What are two different ways to describe and label the layers of the Earth?