The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
This is a Java program I wrote which counts the total of all the vowels in your name.
import javabook.*;
class CountVowels
{
public static void main (String[] args)
{
MainWindow mainWindow;
MessageBox messageBox;
InputBox inputBox;
mainWindow = new MainWindow("Count Vowels in Your Name");
messageBox = new MessageBox( mainWindow );
inputBox = new InputBox( mainWindow );
mainWindow.setVisible( true );
String name;
int numberOfCharacters,
vowelCount = 0;
char letter;
name = inputBox.getString("Please enter your name?");
numberOfCharacters = name.length();
for (int i = 0; i < numberOfCharacters; i++) {
letter = name.charAt(i);
if ( letter == 'a' || letter == 'A' ||
letter == 'e' || letter == 'E' ||
letter == 'i' || letter == 'I' ||
letter == 'o' || letter == 'O' ||
letter == 'u' || letter == 'U' ) {
vowelCount++;
}
}
messageBox.show(name + ", your name has " +
vowelCount + " vowels");
}
}// end of class CountVowels
For what purpose do you need to count each letter?
Also what format do you have to do it in, ie if someone like me wrote a program would you be able to compile and run it to use or is it just the source you need to see to help and use for examples.
pseudocode any use or must it be full code etc.
Could be done with most programming languages with a bit of thought.