Advertisement
tchenkov

L06u03_SquareOfStars

Feb 16th, 2017
195
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. package Uprajneniq;
  2.  
  3. import java.util.Scanner;
  4.  
  5. /**
  6.  * Created by todor on 15.02.2017 г..
  7.  */
  8. public class u03_SquareOfStars {
  9.     public static void main(String[] args) {
  10.         Scanner scan = new Scanner(System.in);
  11.         int squareSize = Integer.parseInt(scan.nextLine());
  12.         String star = "* ";
  13.         for (int i = 0; i < squareSize; i++) {
  14.             for (int j = 0; j < squareSize; j++) {
  15.                 System.out.print(star);
  16.             }
  17.             System.out.println();
  18.         }
  19.     }
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement