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

Why do the detectives say they need the dress? for a date for a dance for an evening out
Please answer now!!!
TRUE OR FALSE 1. Standard units gives a consistent and accurate of the volume of a container. TRUE OR FALSE ?
the the radius of a sphere is 8 cm. find the volume. round off to nearest tenth if necessary. use 3.14 for pi​
add. express your answer in simplest form. 1/12 + 5/12
A board game uses a deck of cards that players draw from to move tokens around the board. The probability of selecting a card that moves a player's token forwar
anyone have any ideas?
Type the correct answer in each box. a race car is driven by a professional driver at 99 . what is this speed in and ? 1 mile = 1.61 kilometers 1 hour = 60 minu
Which continent is Turkey in? a| Asia b| Africa c| Europe d| North America
Select the correct answer. Which god was a son of Zeus and Hera? OA. Ares OB. Apollo O C. Athena OD. Amphion