HI!!!I am new in java i would like to know sample program that counts the number of vowels of word

Recommended Answers

All 2 Replies

Well, if you meet one, introduce it to me, too.

HI!!!I am new in java i would like to know sample program that counts the number of vowels of word

what exactly do you want? to count the vowels in a 'word', as a String object, or in a 'Word' document :P
be a bit more specific.

I believe it is the first, so I'll give you a starting point, as in some sort of pseudo-code

Read a word
Set counter to 0
Perform for each letter (character) of that word
-- if the letter (character) is a vowel:
-- -- add 1 to counter
print: "there are " counter " vowels in the word"

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.