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

Solve the equation, using the domain of x = {-1, 0, 2}. Write your solutions as a set of ordered pairs listed from least to greatest based on the x value. Do n
A group of 18 people ordered soup and sandwiches for lunch. Each person in the group had either one soup or one sandwich. The sandwiches cost $7.75 each and the
does magma contain only three elements
what does C12 H22 O11 phSO mean
Social Darwinism was formed by a. nationalists and racists. c. Postimpressionists and Cubists. b. scientists and mathematicians. d. psychoanalysts and psycholog
one side of a square is 7cm what is the area
One of the most significant impacts of the increased use of chemical fertilizers, herbicides, and pesticides is __________. A. a decreased need for irrigation B
Ustedes___ (estudiar) en la biblioteca
Jeb looked through the paper and came across an article called "A Look Back at the Civil War." He wondered if the article had any information on Robert E. Lee.
Fidel Castro used the failed 1961 invasion of Cuba as an excuse to get more military equipment from the Soviet Union. This provided the basis for the next diplo