using System;
namespace test
{
class Program
{
static void Main(string[] args)
{
//按回车后,继续循环。
while (1 == 1)
{
Random ran = new Random();
int n = ran.Next(1,4);
if (n == 1)
{
Console.WriteLine("石头");
}
else if (n == 2)
{
Console.WriteLine("剪刀");
}
else
{
Console.WriteLine("布");
}
Console.ReadKey();
}
}
}
}
c#石头、剪刀、布
最新推荐文章于 2023-01-04 17:09:36 发布