Looking for trustworthy answers? Westonci.ca is the ultimate Q&A platform where experts share their knowledge on various topics. Join our Q&A platform to get precise answers from experts in diverse fields and enhance your understanding. Join our Q&A platform to connect with experts dedicated to providing accurate answers to your questions in various fields.

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