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

Ted kerasote's essay a killing at dawn what is the setting
Ron is 30 years old and is retiring at the age of 65. when he retires, he will need a monthly income of $1,270 for 10 years. if ron contributes 5% of his monthl
Please help me with this question
Noise, movement, light, darkness, heat, and cold are all examples of internal distractions. a. True b. False
at a concession stand, 9 pieces of pizza and 5 soft pretzels cost $33.25. if 4 pieces of pizza and 6 soft pretzels cost $19.50, what is the cost of a slice of a
What are the two prepositions?
There are 12 eggs in a dozen. if a farmer's chickens produce an average of 726 dozen eggs in a month, how many eggs are reported per month?
Why can the north african desert at noon be an uncomfortable place for humans?
can someone help me with this?
Most major world religions and intelligent design proponents are least likely to emphasize what central idea aspect of evolutionary theory?