-
I am having problem
Use array to write a program that will count the numbers of vowels in a sentence that the user will enter
-
First start by opening your favorite IDE (if you use one)
Let me know once you have done this and I will tell you the next step
-
 Originally Posted by Sandie
Use array to write a program that will count the numbers of vowels in a sentence that the user will enter
The hard part is going to be the logic behind how to determine if y is a vowel or not. In words like WHY it is, in words like YES it is not. I would recommend a lookup table of the common words where Y is a vowel and then do a "best guess" algorithm for words not in your little dictionary. Something like a proximity to vowel (the true rule is based on the sound of the word, which is not easy to implement) such that if a Y is close to a vowel, it is not a vowel, if it is far (3 letters?) from a vowel, it is one? Or, as a cheap alternative, offer two or more counts --- "This sentence has 8 vowels and 2 Ys which could be vowels in the words yellow, why for a total of 8,9, or 10 vowels". Complex, but it provides the user with the information needed.
-
Any suggested use of the array(s)? Is this a six element array in which you increment the element of the vowel array you have currently identified.
The most important methods you'll need to provide will be the capture of the text being evaluated,the processing of the string captured, and then the reporting of results.
Similar Threads
-
Replies: 11
Last Post: 11-16-2007, 12:23 PM
-
By Shannon in forum VB Classic
Replies: 7
Last Post: 06-24-2007, 08:47 PM
-
Replies: 0
Last Post: 12-13-2001, 12:06 PM
-
By Ayman in forum VB Classic
Replies: 0
Last Post: 04-03-2000, 01:08 AM
-
By Jason Bock in forum VB Classic
Replies: 0
Last Post: 03-21-2000, 06:48 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks