GetDotted Domains

Viewing Thread:
"Alphabet Calculator"

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.

Fri 07/02/03 at 18:30
Regular
Posts: 787
I need this Counter which would like search through a bunch of text and tally up all the times for example "A" has appeared as well as for the rest of the alphatbet. WOuld anyone know of this type of thing?
Fri 07/02/03 at 20:47
Regular
"Picking a winner!"
Posts: 8,502
Don't know if this will work (well look ok because of spacing)
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.
Fri 07/02/03 at 20:21
Regular
"poo poo for you!"
Posts: 2,161
please if you could. its just got to tally up like how many times each letter of the alphabet (how many times each letter appears) from a block of txt
Fri 07/02/03 at 20:07
Regular
"Eff, you see, kay?"
Posts: 14,156
I could do it in PHP for you.
Fri 07/02/03 at 19:59
Regular
"Picking a winner!"
Posts: 8,502
What you got to do it in?
Could be done with most programming languages with a bit of thought.
Fri 07/02/03 at 19:57
Regular
"poo poo for you!"
Posts: 2,161
naw naw its for my stats coursework. do you know of anything like this?
Fri 07/02/03 at 18:33
Regular
"Cardboard Tube Ninj"
Posts: 2,221
Doing some crypto are we?
Fri 07/02/03 at 18:30
Regular
"poo poo for you!"
Posts: 2,161
I need this Counter which would like search through a bunch of text and tally up all the times for example "A" has appeared as well as for the rest of the alphatbet. WOuld anyone know of this type of thing?

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Many thanks!
You were 100% right - great support!
Just a quick note to say thanks for a very good service ... in fact excellent service..
I am very happy with your customer service and speed and quality of my broadband connection .. keep up the good work . and a good new year to all of you at freeola.
Matthew Bradley

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.