文件名称:josephus
介绍说明--下载内容均来自于网络,请自行研究使用
设编号为1,2,…,n(n>0)个人按顺时针方向围坐一圈,每人持有一个正整数密码。开始时给出一个报数上限m,从第一个人开始顺时针方向自1起顺序报数,报到m时停止报数,报m的人出列,将他的密码作为新的m值,从他在顺时针方向上的下一个人起重新自1报数;如此下去直到所有人全部出列为止。设计一个程序模拟此过程,在qt中设计出基本的提示及显示结果的界面,给出出列人的编号序列及出列人手持密码值。- A descr iption of the problem are: number 1,2, ..., n of n individuals sitting around a circle clockwise, each holding a password (positive integer). Choose a positive integer beginning as a limit on the number of reported m, starting the first person to start a clockwise direction a report number, report the number of reported m stop. Who reported m out of line, his password as the new m value, in a clockwise direction the next person he began to re-reported a number, it goes on until all the people all of the columns so far. Design a program, according to the column order prints each number.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
josephus\game.cpp
........\game.h
........\game.ui
........\josephus.pro
........\josephus.pro.user
........\main.cpp
........\mainwindow.cpp
........\mainwindow.h
........\mainwindow.ui
josephus