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

steps in writing an essay
The sum of three numbers in order is 57. the equation that represents this is x (x 1) (x 2) = 57. which value of x from the set {16, 17, 18, 19} makes the equat
Which is one common characteristic of much haiku poetry?
Read the excerpt below from The Lorax by Dr. Seuss and answer the question that follows. From the rippulous pond came the comfortable sound of the Humming-Fish
If you are always trustworthy you are never?
(mx+8)(2x-4) what is the value of m?
Jesus came to earth to replace the Law. True False
Round 785 to 3 significant figures.
What is the sales tax of $178.90 with a tax rate of 5.75%?
The room was silent for a long moment. Then, ______, a loud, piercing wail tore at our ears. If the writer wants to convey a sense of suddenness, what is th