Electrical and Computer Engineering
18 of 22
UAH
CPE 112
Modified Example
(continued)
•void PrintLines( int numLines )   function definition
•
•// This function prints lines of asterisks, where
•// numLines specifies how many lines to print
•
•{
•    int count;      // Loop control variable
•    count = 1;
•    while (count <= numLines)
•    {
•        cout << "***************" << endl;
•        count++;
•    }
•}