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

Plot the point on this function with an x-value of 6. What is the y-value of this point?
Carter invested $70,000 in an account paying an interest rate of 1.125% compounded continuously. Savannah invested $70,000 in an account paying an interest rate
Solve the system of equations below by graphing. Type in the ordered pair (x,y) for your answer y=-2 x+y=5
Solve each equation. |x+5|=-3
Plot the point on this function with an x-value of 6. What is the y-value of this point?
What is 4.5 repeating as a fraction?
What is the sum of the matrices shown below? 3 6 0 9 5 -2 + 6 0 -8 4 =
Help with is ixl please
A parking garage bases its prices on the number of hours that a vehicle parks in the garage.The first two hours cost $2 per hour, between two hours and six hour
What is the sum of the matrices shown below? 3 6 0 9 5 -2 + 6 0 -8 4 =