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 p=7 a solution of the equation 4p - 5 =16​
these are the means and standard deviation for samples of building heights in two different cities. Select the two true statments.
PLZ HELP,, WILL BE MUCH APPRECIATED! Robert and Susan's mother is 160cm tall. Their father is 180cm tall. The formula to calculate a boy's predicted height is:
What is the value of x when f(x) = 4?
Answer the question please
How beneficial are flexibility exercises?
A dog jumps straight up in the air to catch a ball and lands on the ground 1.3 s later. Let h(t) represent the dog’s height, in meters, t seconds after he leave
I need help with this question make sure to pick ALL.
Fill in the blanks with a suitable form of verbs given in the brackets:-1) The criminal was .........(hang) till death.2)Please do not disturb me. I .......(do)
The mass movement of rural people to the city is: