C 语言实例 - 约瑟夫生者死者小游戏
30 个人在一条船上,超载,需要 15 人下船。
于是人们排成一队,排队的位置即为他们的编号。文章源自公式库网-https://www.gongshiku.com/html/202112/c-yuyanshili-yuesefushengzhesizhexiaoyouxi.html
报数,从 1 开始,数到 9 的人下船。文章源自公式库网-https://www.gongshiku.com/html/202112/c-yuyanshili-yuesefushengzhesizhexiaoyouxi.html
如此循环,直到船上仅剩 15 人为止,问都有哪些编号的人下船了呢?文章源自公式库网-https://www.gongshiku.com/html/202112/c-yuyanshili-yuesefushengzhesizhexiaoyouxi.html
实例
执行以上实例,输出结果为:文章源自公式库网-https://www.gongshiku.com/html/202112/c-yuyanshili-yuesefushengzhesizhexiaoyouxi.html
运营不易,
感谢支持!

我的微信
我的微信公众号
我的微信公众号扫一扫

我的公众号