Skip to content

Instantly share code, notes, and snippets.

@HileryChao
Created March 7, 2015 05:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HileryChao/9efaf370c21c5d97dfda to your computer and use it in GitHub Desktop.
Save HileryChao/9efaf370c21c5d97dfda to your computer and use it in GitHub Desktop.
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