Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class Zadanie311 {
- public static void main(String[] args) {
- for (int i = 0; i <= 1000; i++) {
- if ((i % 5 == 0) && (i % 3 == 0))
- System.out.println(i + " FizzBuzz");
- else if (i % 5 == 0)
- System.out.println(i + " Buzz");
- else if (i % 3 == 0)
- System.out.println(i + " Fizz");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement