namespace Work4
{
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
class Program
{
static void Main(string[] args)
{
int max = 0;//输出所输入数字中的最大值
while (true)
{
Console.WriteLine("请用户输入一个数");
string s = Console.ReadLine();
if (s == "end")
{
Console.WriteLine("所输入的数中的最大值为:{0}", max);
Console.ReadKey();
return;
}
int a = Convert.ToInt32(s);
if (a > max)
{
max = a;
}
}
}
}
}