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

Large groups of galaxy clusters that appear in sheet like and threadlike shapes are known as
Name all the planets in the solar system?
At the completion of mitosis, the nucleus of a human somatic cell has ___ chromosomes. a. 23 b. 46 c. 92 d. 184
Two similar triangles are shown below: Two triangles are shown. The sides of the triangle on the left are marked 6, 8, 4. The sides of the triangle on the right
Geographic information about human activities __________. A. can help leaders decide how to plan for the future B. is used only by geographers, not other citize
What was he benefit of a calotype over a daguerreotype?
you're a member of the republican party. you go to vote for the party nominee for president. on your ballot are candidates for both the democratic and republica
The table shows the solution to the equation |2x − 5| − 2 = 3: Step 1 |2x − 5| = 3 + 2 Step 2 |2x − 5| = 5 Which is the first incorrect step? Step 3 2x − 5 =
If you believe a person is having a stroke you should
During a very hot, sunny day, are stomata likely to be open or closed? Explain.