void printList(numList & L) { // Print the integers in list L, 5 per line. for (int i=1; i <= L.size(); i++) { cout << " " << L.getnum(i) ; if (!(i%5) ) cout << endl; // Start new line after every 5th one. } if (!((i-1)%5)) cout << endl; // End last line if needed. } // end printList