Advertisement
Guest User

Untitled

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