Skip to content
Snippets Groups Projects
Commit 60376a29 authored by samuel turpin's avatar samuel turpin
Browse files

its tp3 final

parent 9baf654c
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -23,14 +23,6 @@ public class UseLocalDate
return false;
}
private static void whileB(int nbKey, int min, int max)
{
do
{
nbKey = Keyboard.readInt();
}while(!(nombreValide(nbKey, min, max)));
}
private static boolean bissextile(int year)
{
if(year % 4 == 0 && year >= 1582)
......@@ -60,9 +52,6 @@ public class UseLocalDate
System.out.println("Entrez un jour entre 1 et 31 (doit être correct en fonction du mois ou de l'an bissextile) :");
day = Keyboard.readInt();
}while(!(nombreValide(day, 1, 31)));
/*whileB(year, 1970, Integer.MAX_VALUE);
whileB(month, 1, 12);
whileB(day, 1, 31);*/
if(day == 29 && month == 2 && !bissextile(year))
{
......@@ -78,6 +67,7 @@ public class UseLocalDate
return data;
}
System.out.println("Erreur la date entrée n'est pas correcte veuillez vérifier le nombre de jours présent dans ce mois");
return null;
}
public static void main(String[] args)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment