Click to See Complete Forum and Search --> : c++


nikolas22t
03-21-2005, 08:32 PM
Could anybody help me with this ?

Program 5: Write a program to count the vowels and letters in free text given as standard input. Read text a character at a time until you encounter end-of-data.
Then print out the number of occurrences of each of the vowels a, e, i, o and u in the text, the total number of letters, and each of the vowels as an integer percentage of the letter total.
Suggested output format is:
Numbers of characters:
a 3 ; e 2 ; i 0 ; o 1 ; u 0 ; rest 17
Percentages of total:
a 13%; e 8%; i 0%; o 4%; u 0%; rest 73%
Read characters to end of data using a construct such as
char ch;
while(
( ch = getchar() ) >= 0
) {
/* ch is the next character */ ....
}
to read characters one at a time using getchar() until a negative value is returned.

PeOfEo
03-22-2005, 12:29 AM
sounds like you want us to do your homework for you.

nikolas22t
03-22-2005, 06:03 AM
i want a hint how to start