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

What is 5.8 x 10^6 seconds in minutes? Just to clarify ^x means exponent. A. 3.48 x 10^8 minutes B. 9.67 x 10^4 minutes C. 9.67 x 10^8 minutes D. 3.48 x 10^4
in the problem 4 times 12 equals 48 which numbers are the factors
Why do you think most philosophers were from the middle class or nobility?
the equation f(x)=x-5  translated 4 units to the left is
Compared with earlier presidents, modern presidents are more involved in
Which reason justifies the statement that KLC is complementary to KJC?
Activity: cohesion of water what process exerts the pull on water molecules that is relayed from leaf to root via cohesion?
A bank's monthly charge for maintaining an account is $.45 for each check written plus a service charge of $12.50. If x represents the number of checks written
Where would you find the most news about the rising tensions in the Middle East? A. In the newspaper B. On television C. On the internet D. In a magazin
what operation should be performed first to solve this problem? the Johnson family can fly from Washington DC to London $18 per mile per person. The distance is