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