首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 编号为1,2… n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数的上限值m,从第一个人开始按顺时针方向自1开始顺序报数,...

编号为1,2… n的n个人按顺时针方向围坐一圈,每人持有一个密码(正整数)。一开始任选一个正整数作为报数的上限值m,从第一个人开始按顺时针方向自1开始顺序报数,...

  • 资源大小:4.10 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: 汇编语言 vb

资 源 简 介

编号为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 o

文 件 列 表

yuesefu.doc
VIP VIP
0.199175s