/**
* Program : Fizz Buzz menggunakan Java
* Date : 19 Juni 2022
* Author : Riyanto
* Website : www.melonkoding.com
*/
class Main {
public static void main(String[] args) {
int n = 50;
String m = null;
for(int i = 1; i <= n; i++) {
if((i % 3 == 0) && (i % 5 == 0)) {
m = "Fizz Buzz";
}
else if(i % 3 == 0) {
m = "Fizz";
}
else if(i % 5 == 0) {
m = "Buzz";
}
else {
m = String.valueOf(i);
}
System.out.printf("%d. %s\n", i, m);
}
}
}