27 lines
591 B
Java
27 lines
591 B
Java
|
|
public class Grille {
|
|
public static void main(String[] args) {
|
|
if (args[0] == "0") {
|
|
return;
|
|
}
|
|
System.out.print("+");
|
|
for (int i = 0; i != Integer.parseInt(args[0]); i++) {
|
|
System.out.print("-+");
|
|
}
|
|
System.out.println();
|
|
|
|
for(int j = 0; j != Integer.parseInt(args[0]); j++) {
|
|
System.out.print("|");
|
|
for (int i = 0; i != Integer.parseInt(args[0]); i++) {
|
|
System.out.print(" |");
|
|
}
|
|
System.out.println();
|
|
|
|
System.out.print("+");
|
|
for (int i = 0; i != Integer.parseInt(args[0]); i++) {
|
|
System.out.print("-+");
|
|
}
|
|
System.out.println();
|
|
}
|
|
}
|
|
} |