Skip to content

Instantly share code, notes, and snippets.

@ltagliaferri
Created March 11, 2014 01:07
Show Gist options
  • Save ltagliaferri/9477645 to your computer and use it in GitHub Desktop.
Save ltagliaferri/9477645 to your computer and use it in GitHub Desktop.
public class CracklePop {
public static void main(String args[]){
for(int num = 1; num <= 100; num++){
if(num % 3 == 0 && num % 5 == 0){
System.out.println("CracklePop");
}else if(num % 3 == 0){
System.out.println("Crackle");
}else if(num % 5 == 0){
System.out.println("Pop");
}else{
System.out.println(num);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment