Exercice FizzBuzz

This commit is contained in:
Meutel 2019-06-17 17:38:16 +02:00
parent 7843ea57c2
commit 68fa123bfe
1 changed files with 17 additions and 1 deletions

View File

@ -4,6 +4,22 @@ public class FizzBuzz {
public static final void main(String[] args) {
}
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);
}
}
}
}
}