Electrical and Computer Engineering
3 of 23
UAH
CPE 112
Counting
•count = 0; // Initialize counter
•cin.get(inChar); // Read the first character
•
•while (inChar != ‘.’)
•{
•     count++; // Increment counter
•     cin.get(inChar); // Get the next character
•}
•