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

Beyond fulfilling legal obligation, a diverse work place offers amy other benefits as well. True or False
If vector u = (5, 3) and vector v = (-1, 4), what is the component form of vector u + v?
What is the position a batter takes at the plate called
So for line of best fit, I got y=1.72x+73.35 and then I have to predict what grade a student would get if they read 15 books. Here, I got 99.15 Can someone chec
How does the national government help improve public health?
A new softball dropped onto a hard surface from a height of 25 inches rebounds to about 2/5 the height on each successive bounce. (a) Write a function represent
I’m very lost I️ don’t understand
Who were the gernerals who fought in the cicvlil war?
The data in the table below were obtained for the reaction: 2clo2 (aq) + 2 oh- (aq) --> clo3- (aq) + clo2- (aq) + h2o (l) experiment [clo2] (m) [oh-] (m)
illustrate that the word has the meaning of that root by using one of those words in a sentence. Example: mon 1. admonish 2. demonstrate She admonished her chil