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

If a researcher is studying the relationship between race and educational attainment, and his measure of race is as follows: "Please indicate the racial or ethn
Express 28^1/2 in simplest radical form.
In the article “Anti-Social Networks? We’re Just As Cliquey Online”, How does the author use the final paragraph of the text to refine her ideas?
An important 1913 Texas law gave women ___________. a. the right to vote b. more control over the property they owned before marriage c. healthcare protection
how is manifest destiny and monroe doctrine similar
What well-known cases of internet danger does Coben cute?
What influenced the U.S. Congress to pass the Voting Rights Act?
ANSWER FAST PLZZZZ!!!!!!!!!!!!!
You have a package of 20 assorted thank-you cards. You pick the four cards shown. How many of the 20 cards would you expect to have flowers on them?
Percy Jackson lightning thief chapter 7 please help ASAP