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

A 25 p⁺, 55 n⁰, 25 e⁻ B 25 p⁺, 30 n⁰, 25 e⁻ C 30 p⁺, 25 n⁰, 25 e⁻ D 25 p⁺, 30 n⁰, 23 e⁻
Simplify. 2(x-3)-4x 1
Chromosome 11 is made of over million base pairs. Approximately how many genes are found on chromosome 11? List the genetic disorders found on chromosome 11. D
Chris is walking at a speed of 3.25 miles per hour. If he continues to walk at the same speed, how far can Chris walk in 1.5 hours?
How do disciplines in the field of social sciences generally identify how people can be understood?
How many carbon atoms are there in 3 molecules of CH3F?
Have you ever suddenly lost the ability to do something? Maybe you were injured or sick, or missing something you needed. How did you feel about the situation?
How many outcomes are possible in this control structure? forever OA. Three OB. Four O c. One C. OD. Two if is A button pressed then set background image to
Crime is never a choice - critically discuss. (just need basic idea points and theories)
An object is thrown with a horizontal velocity (Vh) of 15.0 mt/sec and an initial vertical velocity (Vi) of 29.4 mt/sec. How long will the object take to reach