Advertisement
Guest User

Untitled

a guest
Mar 8th, 2017
203
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.83 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. /**
  4.  * Created by Lenovo on 7.3.2017 г..
  5.  */
  6. public class zada4a6  {
  7.     public static void main(String[] args)  {
  8.  
  9.         Scanner console = new Scanner(System.in);
  10.  
  11.         int n = Integer.parseInt(console.nextLine());
  12.         for (int J = 0; j <n; i++) {
  13.             System.out.println("*");
  14.         }
  15.         (System.out.println();
  16.         for (int i = 0; i <n-2 ; i++) {
  17.             for (int j = 0; j < n; j++) {
  18.              if (j==0||j==n-1) {
  19.                  System.out.print("*");
  20.                  else{
  21.                      System.out.print("");
  22.                  }
  23.              }
  24.              System.out.println();
  25.  
  26.             }
  27.             for (int j = 0; j < ; j++) {
  28.                 System.out.println("*");
  29.  
  30.             }
  31.             System.out.println();
  32.         }
  33.         }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement