100分求救一道c#题 本人初学者 不要用太难的思路解答

来源:百度知道 编辑:UC知道 时间:2024/05/31 08:46:16
问题如下
有一群人被困在了一个小岛上,他们只有一个竹排可以逃生,竹排只能坐一个人,于是他们决定通过玩退圈游戏来决定哪个人可以坐上竹排逃生。这些人围成一个圆圈,从1开始每个人顺序编号,他们商定了一个不幸的数字unlunckyNumber,然后从1的人开始报数,报到unlunckyNumber的倍数就退出游戏,真到最后剩下一个人,这个人就是可以得到竹排的人,编写程序,在Main()方法中输入玩游戏的人数和不幸的数字unluckyNumber,自定义Play()方法按游戏规则进行游戏,方法返回赢的人编号。
本人想了很久 实在是没办法了 求各位高手帮忙!!
要求:本人刚刚接触c#不久 还没学太难的东西 知道 数组 字符串等等。。
不要用我没有学过的方法来解决 谢谢各位!!

using System;
using System.Collections.Generic;
using System.Text;

namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
int unlunckyNumbe; //厄运数字
int people;//人数
Console.WriteLine("这是一个非常经典的死亡游戏,只有一个人可以生存!");
Console.WriteLine("请选择游戏人数");
people = int.Parse(Console.ReadLine());
Console.WriteLine("请选择厄运数字");
unlunckyNumbe = int.Parse(Console.ReadLine());
int end = start( unlunckyNumbe, people,out end);
Console.WriteLine("最后的胜利者是:{0}", end);
Console.ReadLine();
}
private static int start(int unlunckyNumbe, int people,out int end)
{
Console.WriteLine("开始游戏了!");
int i = 0;//数组循环的索引