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

What time period first introduced Christmas wreaths?
correct the following sentence using proper grammar: i will going 2 shop too buy icecream
Subject verb agreement “This pair of scissors _______ blunt”
Which set of angle measures could be the measures of the interior angles of a triangle? a. 90°, 42°, and 58° b. 60°, 60°, and 60° c. 100°, 48°, and 42°d. 31°, 7
what word contains the ketters N and Y and a?
Use and misuse of mobile phone essay
Associer chaque équation inéquation a sa représentation graphique
Which factors may increase the likelihood of a person using drugs?a.experiencing depressionb.family members using drugsc.favorite celebrities using drugsd.havin
Write a letter to your mother asking for Some money to buy winter clother. ​
Which is greater 0.48 or -0.58?​