This doesn't look right either. You should really look up what FizzBuzz is. The output should be like:
1
2
fizz
4
buzz
fizz
You can't just print the number for every line. Check this out - https://rosettacode.org/wiki/FizzBuzz or just run the program in the OP which prints correct output.