grodek118

Nested loops pattern

Nov 8th, 2022
951
1
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.31 KB | None | 1 0
  1. public class Main {
  2.  
  3.     public static void main(String[] args) {
  4.  
  5.        final int BASE_SIZE = 7;
  6.  
  7.        for (int r = BASE_SIZE; r > 0; r--)
  8.        {
  9.            for (int c = 0; c < r; c++)
  10.            {
  11.                System.out.print("#");
  12.            }
  13.            System.out.println();
  14.        }
  15.     }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment