haiku generator. A program that pulls randomly from an array of one and two syllable and put them into a new haiku poem following the syllable from 5-7-5
Using Microsoft Small Basic.
haiku generator. A program that pulls randomly from an array of one and two syllable and put them into a new haiku poem following the syllable from 5-7-5
Using Microsoft Small Basic.
The idea behind the solution, i i may, is to make a 3 dimension array.
array["syllables"][1][1] = "red"
array["syllables"][1][2] = "Cat"
array["syllables"][1][3] = "The"
array["syllables"][2][1] = "reading"
and keep going with as many words as you like. then create 3 while loops the first, while the number of syllables in not greater than 5 keep adding words, using the 2nd array dimension as an adder. so get random number that is not greater than the number of syllables possible for the rule. Once you have a random word. add that syllable to a number holder and make the while loop number you are at < total syllables.
in the second not greater than 7 and 3rd not greater than 5.
Hope that helps.