文件名称:yuesefu
介绍说明--下载内容均来自于网络,请自行研究使用
编号为1,2… n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数的上限值m,从第一个人开始按顺时针方向自1开始顺序报数,报到m时停止报数,报m的人出列,将他的密码作为新的m值,从他的顺时针方向上的下一个开始重新从1报数,如此下去,直至所有人全部出列为止,设计一个程序求出出列顺序。
(1)利用单循环链表作为存储结构模拟此过程;
(2)键盘输入总人数、初始报数上限值m及各人密码;
(3)按照出列顺序输出各人的编号。-Numbered 1,2 ... n of the n individuals sitting clockwise circle, each holding a password (positive integer). An optional start a positive integer as the number of reported upper limit of m, from the first person to embark on the clockwise direction starting from a sequence reported the number of stop newspaper report m the number of people who reported m out of the column, as his password The new m value, in a clockwise direction from his next start back from a newspaper a few, and so on, until all all out of the column until a program designed to find out the column order. (1) the use of one-cycle simulation in this linked list storage structure as a process (2) the total number of keyboard input, the initial report and the person m the upper limit of the number of passwords (3) In accordance with a sequence of output of each column number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
yuesefu.doc