cours-info/FizzBuzz.java

26 lines
340 B
Java
Raw Permalink Normal View History

2019-06-02 12:27:13 +00:00
import static utils.Utils.*;
public class FizzBuzz {
public static final void main(String[] args) {
2019-06-17 15:38:16 +00:00
for (int a=1; a<=199; a++){
if (a%3==0){
if (a%5==0) {
afficher("FizzBuzz");
} else {
afficher("Fizz");
}
} else{
if (a%5==0){
afficher("Buzz");
} else{
afficher(a);
}
}
}
}
2019-06-02 12:27:13 +00:00
}