单链表的交并差 第3页

printf("Please input the lenth of the second linktable!  ");
  scanf("%d",&len2);
  printf("/************************************************************************/\n");
  printf("The lenth of the second linktable is %d,please input %d int data!  ",len2,len2);
  init(&head2,len2);
  printf("\n\n/-----------------------------fire works---------------------------------/\n");
  intersection(&head1,&head2,&head3);
  printf("The intersection of two linktable:  ");
  display(&head3);
  printf("/-----------------------------fire works---------------------------------/\n");
  unionset(&head1,&head2,&head4);
  printf("The union set of two linktable:  ");
  display(&head4);
  printf("/-----------------------------fire works---------------------------------/\n");
  diffrenceset(&head1,&head2,&head5);/*第一个减第二个的差集*/
  printf("The set of the first-second:  ");
  display(&head5);
  diffrenceset(&head2,&head1,&head6);/*第二个减第一个的差集*/
  printf("The set of the second-first:  ");
  display(&head6);
  printf("/-----------------------------fire works---------------------------------/\n");
}

上一页  [1] [2] [3] 

Copyright © 2007-2012 www.chuibin.com 六维论文网 版权所有