Get reliable answers to your questions at Westonci.ca, where our knowledgeable community is always ready to help. Explore a wealth of knowledge from professionals across various disciplines on our comprehensive Q&A platform. Get precise and detailed answers to your questions from a knowledgeable community of experts on our Q&A platform.

JAVA

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

Sagot :

tonb

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...