Computer Science, asked by irakhedkar, 1 year ago

Write a program in Java language using BlueJ as the base to print the following pattern:
1
2 3
4 5 6
7 8 9 10

Answers

Answered by MCajitendra
0

Answer:

 int value = 1;

         

       System.out.println("Here is your pattern :");

         

       for (int i = 1; i <= noOfRows; i++)  

       {

           for (int j = 1; j <= i; j++)  

           {

               System.out.print(value+"\t");

                 

               value++;

           }

Explanation:

Similar questions