/// <summary>
/// 求一维数组的最大值和最小值
/// </summary>
public static void Maxmin()
{
int max, min;
int [] q=new int[10]{90,89,72,99,32,45,67,88,97,65};
max = min = q[0];
for (int i = 1; i<10;i++ )
{
if (q[i] > max) max = q[i];
if (q[i] < min) min = q[i];
}
Console.WriteLine("最大值是{0},最小值是{1}",max,min);
}