Advertisement
Guest User

Untitled

a guest
Apr 30th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.41 KB | None | 0 0
  1. public class Zadanie311 {
  2.  
  3.     public static void main(String[] args) {
  4.        
  5.         for (int i = 0; i <= 1000; i++) {
  6.             if ((i % 5 == 0) && (i % 3 == 0))
  7.                 System.out.println(i + " FizzBuzz");
  8.             else if (i % 5 == 0)
  9.                 System.out.println(i + " Buzz");
  10.             else if (i % 3 == 0)
  11.                 System.out.println(i + " Fizz");
  12.         }
  13.     }
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement