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); | |
} |
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
;;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 |