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

1. Phionah poured 100cm³ of water. Phionah later mixed 400cm³ of salt solution of density 1.6gcm3 in the water above. Determine the density of the mixture​
I am eating food do negative 
M is directly proportional to r^3 When r=4, m=160 Work out value of m when r =2
what percent of 105 is 63
You are visiting a job site and observe a worker who is installing siding on a building. The worker is standing on the top step of a ladder that is not long eno
Prepare an extensive Comparison Table of Energy Resources used in India. (Include conventional, non conventional, potential and stock resources)
Prepare an art integrated assignment (Chart tabulation of music, costume, region, language association) of haryana
If f(x)=3x2-5 and g(x) =-2x+5, then f(3)g(3)=?
If you see a red and a white light ahead when boating at night, you should
Question 3 A. Write the HTML code that would produce the following output. Fruits - Mango - Orange - Pineapple Vegetables 1. Carrot 2. Callaloo 3. Tomato