Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

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);
}
;;Program's Function: When given a word and a dictionary, print out all the anagrams of the word
;; that exist in the dictionary. The main procedure is called "create-anagrams".
;;the general idea of the program is to sort the given word in alphabetical order,
;;and compare it to a word in the dictionary, which is also sorted in alphabetical order.
;;if the two words match, then the word in the dictionary is outputted, and then
;;the inputted word is continued being compared to the rest of the words in the dictionary
;;until all the anagrams are outputted.
;;less alphabetically