BUT2/DEV/DEV2.1/Q5_Grille.java~
2023-10-23 13:23:36 +02:00

26 lines
611 B
Java

public class Q5_Grille{
public static void main(String[] args) {
int dimensionX = 0;
int dimensionY = 0;
if (args.length > 1){
dimensionX = Integer.parseInt(args[0]);
dimensionY = Integer.parseInt(args[1]);
System.out.println(dimension);
}
for (int y=0 ; y<dimensionY ; y++){
for (int x=0 ; x<dimensionX ; x++){
System.out.print("+-");
}
System.out.println("+");
for (int x=0 ; x<dimensionX ; x++){
System.out.print("| ");
}
System.out.println("|");
}
for (int x=0; x<dimensionX ; x++){
System.out.print("+-");
}
System.out.println("+");
}
}