suzen123
suzen123 suzen123
  • 04-01-2021
  • Computers and Technology
contestada

JAVA

Write a program to display the given pattern:
3
5 6
8 9 10
12 13 14 15​

Respuesta :

tonb
tonb tonb
  • 04-01-2021

Answer:

class Main {  

 public static void main(String args[]) {

   int nr = 1;

   int value = 3;

   while(value < 16) {

      for(int i=0; i<nr; i++) {

          System.out.printf("%d ",value++);

      }

      System.out.println();

      value++;

      nr++;

   }

 }

}

Explanation:

This is one of the many approaches...

Answer Link

Otras preguntas

Hello. For my french class I have to write a letter to my french friend. In this letter I have to talk about spending my holiday at his house. (for example: wha
"Pilgrim progress" what does the town vanity symbolize?
Which religion has a cultural landmark the dome of the rock
if cosx=1/12 and sinx>0 find tan2x
Three friends go bowling the cost per person per game is $ 5.30 the cost to rent shoes is $ 2.50 per person.Their total cost is $ 55.20 how many games did they
what british policy did american colonists protest at the boston tea party
what two developments in the late 1800s led to the decline of the cattle business ?
what were the 4 major causes of imperialism?
Can the sum of two mixed numbers be equal to 2 ? Explain why or why not.
What is the percentage increase from 200 to 280