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

Lowest fraction using common term 28/35
Consider the following statements: #include #include class Temporary { private: string description; double first; double second; public: Temporary(s
Summarizing what tasks did the second continental of government
Solve the compound inequality. Graph your solution. 2x – 2 < –12 or 2x + 3 > 7 x < –5 or x > 5 x < –5 or x > 2 x < –12 or x >
How does the author foreshadow trouble in the prison? Support your answer with explicit textual evidence.
3/4 = c/36 I need help with this fraction proble.
in a voltaic cell, electrons flow from the (positive/negative) to the (positive/negative) terminal.
PLS HELP !!!! Excerpted from "Hope is the Thing with Feathers" by Emily Dickinson [2] And sweetest—in the Gale—is heard— And sore must be the storm— That could
June 19 is often a holiday in Texas. It is Emancipation Day. What important event happened on Emancipation Day? A) It marks the end of slavery in Texas. B) It
What is the solution for the following system of equations?Use ANY method to solve. y = -x +4 y = x - 2 _________________________________ a. ( 4 , -2) b. (