DEV/DEV2.1/TP1/Grille.java

29 lines
566 B
Java
Raw Normal View History

2023-02-10 11:52:05 +01:00
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("-+");
}
}
}