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

Function 32 f(32) = 120 + 5(32 − 30) 36 f(32) = 120 + 5(36 − 30) 38 f(32) = 120 + 5(38 − 30) 40 f(32) = 120 + 5(40 − 30)
The cost to mail a package is $7 for the first 2 pounds and 30 cents for each additional ounce. Which of the following functions represents the cost to mail a
Which of the following is a disadvantage of being a high self-monitor? Question 7 options: a) Self-monitors are awkward in social situations. b) High self-m
If you are delt 4 cards from shuffled deck of 52 cards, find the probability that all 4 cards are diamonds
Southern colonies were founded mostly for?
In which part of the scientific method would you make a prediction?
why do X-linked traits appear more often in males
Paint thinners, gasoline , and glue are common forms of?
America's artistic achievements in the first half of the nineteenth century a. borrowed heavily from existing european styles in painting and architecture. b. i
Which has the greater number of particles, 1 mole br2 or 80g br2?