Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- public class gugugug {
- public static void main(String[] args) {
- Scanner scan = new Scanner(System.in);
- int n = scan.nextInt();
- System.out.print("+");
- for( int i = 0 ; i < n - 2 ; i++ ) {
- System.out.print("-");
- }
- System.out.println("+");
- for (int i = 0 ; i < n - 2 ; i++) {
- System.out.print("|");
- for ( int j = 0 ; j < n - 2 ; j++) {
- System.out.print("-");
- }
- System.out.println("|");
- }
- System.out.print("+");
- for( int i = 0 ; i < n - 2 ; i++ ) {
- System.out.print("-");
- }
- System.out.println("+");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement