C++ Exercise

0 SAWJ Bond · April 14, 2015
Hi all! Can anyone help me with this question?

Write a program to read in a sentence which is terminated by a full stop and calculates 
the number of lower case vowels in the sentence. Use an array of char  elements. Limit 
the length of this array to 100 elements.

Post a Reply


Oldest  Newest  Rating
0 Dol Lod · April 14, 2015
What specifically do you want help with? Do you not understand the spec or how to do a particular task?

As usual break the problem down into subgoals to accomplish and then merge the concepts you learn together to build the program.


1) Read from STDin. Simply try reading in any data at all this way. Then try for a sentence. Try for a function that works well like cin.

2) Figure out how to identify a lower case letter. I think cctype would be a great resource to use for this b/c of the isLower function.

3) Use a for loop to iterate through a character array, identifying and counting lowercase values. 

Main Goals

Simply declare an array of 100 characters that you read data into. Next apply subgoal 3 to the read input using the full stop as the terminating character.

None of this is direct code, but it does provide a general outline of how to get your project done smoothly so you won't spend hours debugging something that you could have simply fixed by testing everything at the very beginning. 
  • 1



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator