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

J owns a business and has a group life policy covering her employees. j decides to cancel the policy by letting it lapse on the renewal date. what action must b
Which expression is equivalent to 4 sqrt x^10
Find the equivalent exponential expression. (7^4)^5
Explain cultural relativism
The graph shows the cost per day for renting a car. Which statement is true? A) The rental cost is $150 per day. B) The slope of the graph is zero. C) The gra
(14u^6v^4)(6u^4v^2)(22u^3v^4) find the greatest common factor of the monomials
Identify the use of the italicized noun clause. "The reason I am late is that I had failed to set the alarm." (choose one) -direct object -subject -subject c
Will mark you the brainliest please two people answer Explain meaning of constitution
Change the 24th bead to a different color. What does the sentence say now (re-read the entire sentence)? Does the sentence still make sense?
Simplify this answer.......