Advertisement
desislava_topuzakova

02.Rectangle of N x N Stars

May 27th, 2018
199
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.40 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class RectangleNxN {
  4.     public static void main(String[] args) {
  5.  
  6.         Scanner scanner = new Scanner(System.in);
  7.          int n = Integer.parseInt(scanner.nextLine());
  8.  
  9.         for (int i = 0; i < n ; i++) {
  10.             for (int j = 0; j < n ; j++) {
  11.                 System.out.print("*");
  12.             }
  13.             System.out.println();
  14.         }
  15.  
  16.     }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement