Advertisement
YavorGrancharov

SquareOfStars_loop

Feb 12th, 2017
166
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 SquareOfStars_loop {
  4.     public static void main(String[] args) {
  5.         Scanner console = new Scanner(System.in);
  6.         int n = Integer.parseInt(console.nextLine());
  7.         for (int i = 0; i < n; i++) {
  8.             for (int j = 0; j < n; j++) {
  9.                 System.out.print("*" + " ");
  10.             }
  11.             System.out.println();
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement