Electrical and Computer Engineering
14 of 23
UAH
CPE 112
Another Nested Loop Example
•cin >> starCount;
•while (cin)
•{
•   loopCount = 1;
•   while (loopCount <= starCount)
•   {
•      cout << ‘*’;
•      loopCount++;
•   }
•   cout << endl;
•   cin >> starCount;
•}
•cout << “Goodbye” << endl;