Solved

program

Posted on 1997-03-07
2
180 Views
Last Modified: 2010-04-16
Hello,
         I have tried enough working with the problem written down. Please, provide me with every possible solution as soon as possible.

* Write a program to input a sentence, count the number of words, frequency of each vowel and the number of consonants, Display the results.
                        Thank you
0
Comment
Question by:hileen
2 Comments
 

Accepted Solution

by:
yeast earned 200 total points
ID: 1215238
use an array to store characters as a word

while not eoln do
begin
   read(x);
   array[counter].character:=x;
end;

-Ethan
 
0
 

Expert Comment

by:nick030897
ID: 1215239
1.use a loop and obtain the number of spaces present in the sentense. That's a way to obtain the number of words used.
2. use separate counters for each vowel and increase them when the next char read is the same. (vowel frequency)
3. every other char different than vowel, space or digit should be treated as a consonant.So use anohter counter and take advantage of isaplha isdigit etc. functions.

Nikolay
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
Owning a franchise can be the dream of a lifetime. It provides a chance for economic growth. You can be as successful as you want.  To make your franchise successful, you need to market it successfully. Here are six of the best marketing strategies …
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now