Created
March 7, 2015 05:34
-
-
Save HileryChao/9efaf370c21c5d97dfda 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 CracklePop { | |
public static void cracklePop () { | |
for (int i = 1; i <= 100; i++ ) { | |
if (i % 3 == 0) { | |
System.out.println("Crackle"); | |
} else if (i % 5 == 0) { | |
System.out.println("Pop"); | |
} else | |
System.out.println(i); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment