    
int main(int argc,char* argv[])      /* use command line args */
{
  List l;
  int i=1;

  switch(argc) {
  case 1: cout << " no numbers entered " << endl; exit(0);
	  
	default: while (argc-- >> 1)
	  l.add_item(atoi(argv[i++]));      /*enter numbers one by one to add*/
	  break;                            /*into the list*/
	}
  cout << "cardinality is " << l.number_of_elements()<< endl;
  cout << "max is " << l.max()<< endl;            /*the maximum element of the list*/
  while (i-- >1) {                         /*is found and then deleted till */
    l.delete_item(l.max());               /*the list is empty               */
    cout << "max is " << l.max()<< endl;
  cout << "cardinality is " << l.number_of_elements()<< endl;
  }
			    
}                      
     
 

















