打印: Console.WriteLine();
第一天随便写写:
namespace study_vs
{
class Program
{
static void Main(string[] args)
{
Random random = new Random();
int r = random.Next(0, 100);
string s = "";
if (r>=0 && r<10)
{
s = "关羽";
}else if(r>=10 && r<20)
{
s = "张飞";
}else if(r>=20 && r<30)
{
s = "黄忠";
}else if(r>=30 && r<40)
{
s = "赵云";
}else
{
s = "啥也不是";
}
Console.WriteLine(s);
Console.ReadKey();
}
}
}