Created
April 28, 2015 12:29
-
-
Save Eeemil/c516e0a64d2ae80fbdd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Main { | |
public static void main(String[] args) { | |
// write your code here | |
fizzBuzz(1); | |
} | |
public static void fizzBuzz(int i){ | |
System.out.println(i++); // 1 | |
System.out.println(i++); // 2 | |
System.out.println("Fizz"); i++; // 3 | |
System.out.println(i++); // 4 | |
System.out.println("Buzz"); i++; // 5 | |
System.out.println("Fizz"); i++; // 6 | |
System.out.println(i++); // 7 | |
System.out.println(i++); // 8 | |
System.out.println("Fizz"); i++; // 9 | |
System.out.println("Buzz"); i++; // 10 | |
System.out.println(i++); // 11 | |
System.out.println("Fizz"); i++; // 12 | |
System.out.println(i++); // 13 | |
System.out.println(i++); // 14 | |
System.out.println("Fizz Buzz"); i++; // 15 | |
fizzBuzz(i++); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment