CMPT 129 Lecture Notes - Lecture 8: Standard Streams, Infinite Loop

74 views3 pages

Document Summary

#include using namespace std; int main () // this program reads a string of characters from the keyboard. // the end of the string of characters in indicated by a tab. // one character at a time determining if that character is a vowel. // the program also counts the number of occurences of each vowel. // (a,e,i,o,u,y) in the string and the number of non whitespace. // characters in the string that are not vowels. // the number of each vowel counted and the number of non. // vowel characters counted are summarized after all characters in. // the string have been analysed and counted. // note: separate counters are defined for each vowel, for other. //initialize answer, so test in infinite while loop for next string is true answer = "y"; while (answer == "y" || answer == "y") // must be reinitialized for each new file, so initialization is.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents