| xCV5211x (3) | |||
|
Hello all, I need to write a program that reads in 1 text character at a time and counts the number of individual vowels. It was also suggested that I use a while loop, with 5 separate counters. Also, when a period or question mark appears in the input text, the program prints the number of vowels and stops. I tried making a while loop with 5 'if' statements, that (i thought) would increment each vowel counter, but the program would never terminate. Should I use a do-while loop, using 5 if statements to increment the counters, and end it with while (c != '.' || c!= '?');
This is a tentative code which compiles, but doesn't seem to terminate. Any help is appreciated. Thanks | |||
|
Last edited on
|
|||
| detroit (174) | |
| Post the code so we can see it and guide you in the right direction.... | |
|
|
|