Electrical and Computer Engineering
11 of 23
UAH
CPE 112
Is This a Well-Formed Loop?
•
•commaCount = 1;
•cin.get(inChar);
•
•while (inchar != ‘\n’)
•{
•    if (inChar == ‘,’)
•         commaCount++;
•    cin.get(inChar);
•}
•cout << commaCount << endl;
•