Advertisement
Guest User

Untitled

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