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

what is the answer of 67 × 27​
Which phrase is most likely to be on a shopping bill? A. ajouter au panier B. montant total C. payer avec une carte D. chercher sur l’internet
I need help with this challenge question pls someone help asap​
Will the point (2, 6) be on the graph of y = 3x? A. No, because an equation does not have points. B. Yes, because x = 6 and y = 2 is a solution to the
write a system of linear inequalities representing by the graph.
help me out pleaseee ​
Train A and Train B leave the station at 2 P.M. The graph below shows the distance covered by the two trains. Compare the speeds of the two trains.
why did the parliament approve the writs of assistance?​
Why is the trail of tears often called a national tragedy?
Which chemical equation represents a precipitation reaction?