Guest User

Untitled

a guest
Jul 21st, 2018
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. for(int i = 1; i <= 100; i++) {
  2.  
  3. if(i % 3 == 0 && i % 5 == 0) {
  4. System.out.println("FizzBuzz");
  5. } else if (i % 3 == 0) {
  6. System.out.println("Fizz");
  7. } else if (i % 5 == 0) {
  8. System.out.println("Buzz");
  9. } else {
  10. System.out.println(i);
  11. }
  12.  
  13. }
Add Comment
Please, Sign In to add comment