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

is 3/12 simplified 1/4
List the rights that the nazi government took from the Jews.
which pull factor accounted for much of Chinese immigration to the United States in the mid-1800s?
A slice through the human body that parallels the long axis and extends from front to back, dividing the body in to left and right halves,is called the ?
Analyze the ways in which farmers and industrial workers responded to industrialization in the Gilded Age (1865-1900).
Which group is on the extreme left of the political spectrum, and favors strong government intervention in the economy? A. conservatives B. radicals C. reaction
In a democratic society, which of the following statements best describes how people earn a living? a People must have the same career that their parents had. b
why do living things store energy in lipids instead of in carbohydrate?
Which therapeutic cloning application is most likely a benefit to society
Which words in the sentence are the infinitive? When we go to the ice cream shop, I find it is too hard to decide. A. to decide B. When we go C. to the ice crea