Advertisement
mikednip

Untitled

Nov 23rd, 2014
157
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. public class FizzBuzzGame {
  2.     public static void main(String[] args){
  3.         for (int ii = 1; ii < 101; ii++){
  4.             if (ii % 3 == 0){
  5.                 System.out.print("Fizz");
  6.                 if (ii % 5 == 0){
  7.                     System.out.println("Buzz");
  8.                 } else {
  9.                     System.out.println("");
  10.                 }
  11.             } else if (ii % 5 == 0){
  12.                 System.out.println("Buzz");
  13.             } else {
  14.                 System.out.println(ii);
  15.             }
  16.         }
  17.     }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement