Skip to content
Snippets Groups Projects
Commit 2415a7fd authored by EL HADI Mohamed's avatar EL HADI Mohamed
Browse files

tache 7

parent 4ea051d6
No related branches found
No related tags found
No related merge requests found
No preview for this file type
......@@ -22,6 +22,12 @@ public class AlarmClock implements Tickable {
if (givenTime.isAfter(AlarmTime) && Duration.between(givenTime, AlarmTime).getSeconds()<60){
System.out.println("Marseille "+givenTime.format(formatter));
System.out.println("New York "+givenTime.minus(Duration.ofMinutes(60*6)).format(formatter));
if (Duration.between(givenTime, AlarmTime).getSeconds()%3==0){
System.out.println("buzz");
}
if (Duration.between(givenTime, AlarmTime).getSeconds()%5==0){
System.out.println("fizz");
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment