To add any vowel to a string:
Pick a letter of the alphabet.
If the letter is any vowel, append the letter to the string; exit.
Repeat.
To add any consonant to a string:
Pick a letter of the alphabet.
If the letter is any consonant, append the letter to the string; exit.
Repeat.
To make a random string given a length:
If a counter is past the length, exit.
Add any consonant to the random string.
If the counter is past the length, exit.
Add any vowel to the random string.
Repeat.
What better way to write some random English than by using Plain English? I have applied a moderate level of golfing to this code; certain things could be shortened, but it would make this less legible, which would be a shame.
The reason I have defined three routines is because nested loops are forbidden in Plain English, so inner loops must be factored into separate routines.
Parameters and local variables are written as "a string" or "a length" (for example). These are subsequently referred to as "the string" and "the length." If you need to refer to more than one string, you could for example introduce "another string" and refer to it with "the other string." You may also name them whatever you want: "a random string" and refer to it either as "the random" or "the random string."
All arguments are passed by reference; even numbers. To output from a routine, you just modify the arguments. Then you simply refer to the object returned by the routine in the same way as you refer to parameters. For example, to use the routine defined above to output a random English word, you could:
To run:
Start up.
Make a random string given 5.
Write the random string on the console.
Wait for the escape key.
Shut down.
"To run:" is a special routine that signifies the starting point of the program. When added to the other three routines, this results in a program which will show something similar to the following when compiled and run:
