算法猴子选大王源程序

wangdaduizhang 20 0 RAR 2019-05-04 01:05:33

猴子选大王算法源程序voidmain(){intn;intm;printf("请输入猴子的数目和报数:");scanf("%d,%d",&n,&m);LINKp,head,p2;inti;head=p=p2=(LINK)malloc(sizeof(Monkey));//三个指针指向同一块内存for(i=1;inext=p;p2=p;}p2->next=head;//把链表的首尾相连p=head;//p指向了第一个结点p

用户评论
请输入评论内容
评分:
暂无评论