while (true)
{
int x, y, m; //定义三个int类型的变量
Random r = new Random();
x = r.Next(0, 3); // 0为石头, 1为布, 2为剪刀
y = r.Next(0, 3);
m = x - y;
Console.Write("张三="+x+"\t李四="+y);
if( m == -2||m == 1 )
{
Console.Write("\t那就是张三赢");
}
else if (m ==2|| m ==-1)
{
Console.Write("\t那就是李四赢");
}
else
{
Console.Write("\t那就是平手");
}
Console.ReadLine();
}