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

science question below fast answer please
Should government's job be to actively protect citizens and their rights, or should the focus rather be to leave citizens largely as free and unbothered as poss
If vx = 3 meters/second and vy = 4 meters/second, what is the magnitude of the resultant velocity?
Answer the question regarding the attachment it is the same text but one is in Spanish while the other is English. When the tornado was approaching the narrato
A(n) ____ stores data as a trail of tiny pits or dark spots on its surface. select one: a. hard disk b. magnetic storage device c. optical storage device d.
Which medium would be most effective for conveying to a wide audience the importance of stopping smoking?a. A "no smoking" poster b. a radio announcement of a c
Select all that apply. (xyz)2 = _____ The expression without exponents is?
How can you show 4 trillion as a power of 10 using an exponent?
Matt reasoned that he can write 9/1000 as 0.9. Is he correct?
Imagine you are an Acadian man or woman living in Canada at the time of the deportation. Write a letter to a relative in France to describe your experience. Inc