求指教
using System;using System.Collections.Generic;
using System.Text;
namespace findmaxmin
{
class Program
{
static void Main(string[] args)
{
System.Console.Write("请你输入一些列数");
string str = Console.ReadLine();
string[] Array_str = str.Split(',');
int max = Convert.ToInt32(Array_str [0]);
int min = Convert.ToInt32(Array_str [0]);
for (int i = 1; i < str.Length;i++ ) {
max = max > Convert.ToInt32 (Array_str[i]) ? max : Convert.ToInt32(Array_str[i]);
min = min < Convert .ToInt32 (Array_str[i]) ? min :Convert .ToInt32(Array_str[i]) ;
}
System.Console.WriteLine("最大值{0}",max );
System.Console.WriteLine("最大值{0}", min);
}
}
}