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

Which cash crop was the largest export from the South just before the Civil War?
Romeo and Juliet have fallen in love, even though their families despise one another. Based on the excerpt, what are the two main purposes of this prologue?
An interaction in which an animal feeds on plants is called
The northwest ordinance of 1787 set a precedent for other western territories by
Which event in Franz Kafka’s The Metamorphosis can be considered surreal? Gregor’s father kicking out the lodgers Grete’s moving violin-playing Gregor transform
eugene spent $14 on a magazine and some candy bars. if the magazine cost $6 and each candy bar cost $2 then how many candy bars did he buy
how to use the word benefit and expertise
solve each equation for the given variable a-2b=-10 for b
What did President Roosevelt do to try to counter the effects of the Great Depression?
After 3 years what is the total amount of an investment of $1500 in an account paying 3.5% interest, compounded quarterly? A.)$1665.31 B.)$1724.36 C.)$1908.42 D