Ajout des TP
This commit is contained in:
BIN
BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class
Normal file
BIN
BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.class
Normal file
Binary file not shown.
26
BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java
Normal file
26
BUT1/DEV2.2/TP1-Introduction/EXO 5/exo5.java
Normal file
@@ -0,0 +1,26 @@
|
||||
import java.util.Arrays;
|
||||
|
||||
/**
|
||||
* DOC
|
||||
*/
|
||||
|
||||
public class exo5 {
|
||||
/**
|
||||
* DOC
|
||||
*/
|
||||
public static void main(String[] args){
|
||||
for(String tailleGrilleString : args){
|
||||
int tailleGrilleInt = Integer.parseInt(tailleGrilleString);
|
||||
if(tailleGrilleInt < 1){
|
||||
System.out.println("J'affiche quoi si la taille est de " + tailleGrilleInt + " ?");
|
||||
return;
|
||||
}
|
||||
|
||||
for(int i = 0; i<tailleGrilleInt;i++){
|
||||
System.out.println("+-+-+");
|
||||
System.out.println("| | |");
|
||||
}
|
||||
System.out.println("+-+-+");
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user