文件名称:josephus
-
所属分类:
- 标签属性:
- 上传时间:2015-04-29
-
文件大小:5.39kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
设编号为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
josephus/game.h
josephus/game.ui
josephus/josephus.pro
josephus/josephus.pro.user
josephus/main.cpp
josephus/mainwindow.cpp
josephus/mainwindow.h
josephus/mainwindow.ui
josephus
josephus/game.h
josephus/game.ui
josephus/josephus.pro
josephus/josephus.pro.user
josephus/main.cpp
josephus/mainwindow.cpp
josephus/mainwindow.h
josephus/mainwindow.ui
josephus
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.