29 lines
566 B
Java
29 lines
566 B
Java
import java.util.Arrays;
|
|
|
|
public class Grille
|
|
{
|
|
public static void main(String[] args)
|
|
{
|
|
int h = Integer.parseInt(args[0]);
|
|
for (int i = 0;i < h; i++ )
|
|
{
|
|
System.out.print("+");
|
|
for (int j = 0;j < h; j++ )
|
|
{
|
|
System.out.print("-+");
|
|
}
|
|
System.out.println();
|
|
System.out.print("|");
|
|
for (int j = 0;j < h; j++ )
|
|
{
|
|
System.out.print(" |");
|
|
}
|
|
System.out.println();
|
|
}
|
|
System.out.print("+");
|
|
for (int j = 0;j < h; j++ )
|
|
{
|
|
System.out.print("-+");
|
|
}
|
|
}
|
|
} |