borkins

02. Rectangle N x N Stars

Apr 5th, 2017
161
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.53 KB | None | 0 0
  1. /**
  2.  * Project: Drawing_With_Loops - created by borkins on 2017-03-31.
  3.  */
  4.  
  5. import java.util.Scanner;
  6.  
  7. public class _02_Rectangle_NxN_Stars
  8. {
  9.     public static void main(String[] args)
  10.     {
  11.         Scanner console = new Scanner(System.in);
  12.        
  13.         int n = Integer.parseInt(console.nextLine());
  14.        
  15.         for (int row = 0; row < n; row++)
  16.         {
  17.             for (int col = 0; col < n; col++) {
  18.                 System.out.print("*");
  19.             }
  20.             System.out.println();
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment