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 solution has the lower freezing point 1.0 M KBr or 1.0 M CaBr2?
Which of the following is malleable A. Glass B. Pottery C. Ice D. Gold
why is it important to listen to your body when playing sports
what is the molar mass of this hydrate?
What is the real portion of the complex number z= -3 4i? –4 –3 3 4
what is the most important meal for colombians?
The amounts of plastic waste generated in a region during two years were 32,400,000 tons and 20,300,000 tons. what was the total plastic waste generated over th
A boat takes 8 hours to go 6 miles upstream and come back to the starting point. If the speed of the boat is 4 miles per hour in still water, what is the rate o
Why did colonists from South Carolina attack St. Augustine?
Schizophrenia is a mental illness that often develops after the teens, usually occurring in a person's twenties. Which mental health professional is the best re