コード例 #1
0
ファイル: prog1.c プロジェクト: cout/clemson
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