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 stationary coil is in a magnetic field that is changing with time. Does the emf induced in the coil depend
About how many feet are in 3.6 kilometers? 1 m = 39.37 in
On which point do Freud and current developmental psychologists disagree? Group of answer choices importance of early experiences idea that human behavior can b
Solve: 3a^2-4b a= -6 b= -5 If you could also leave an explanation that would be great! Thank you for your time!
Martha, who is single, has a main home in Houston. In the current year, she rented it for 10 days, receiving $5,000 in rental income. Martha paid $20,000 in mor
ajhejskxnkrlsncjeksuf9
all citizens share in running the government _________
I NEED HELP ASAP PLEASE!!! Q2 If 2w + 7 = ─9, what is the value of 15 – 4w? (4 is negative) Q3 Solve the following equations: a) 3/4(16m − 24) = –48 (24 is nega
The cash flows associated with each expansion site are summarized below. The expansion is planned for 5 years, and the interest rate is 12% per year. Use the B/
The Reagan Revolution: a. included cuts to government programs. b. included an emphasis on global human rights. c. had little appeal for most Americans. d. intr