class Program
{
static int MaxValue(int[] intMas)
{
int maxVal = intMas[0];
for (int i = 1; i < intMas.Length; i++)
{
if (intMas[i] > maxVal)
maxVal = intMas[i];
}
return maxVal;
}
static int MinValue(int[] intMas)
{
int minVal = intMas[0];
for (int i = 1; i < intMas.Length; i++)
{
if (intMas[i] < minVal)
minVal = intMas[i];
}
return minVal;
}
static void Main(string[] args)
{
int[] myMas = { 13, 82, 31, 62, 23, 15, 29, 33, 94, 24 };
int maxVal = MaxValue(myMas);
Console.WriteLine("Max {0}", maxVal);
int minVal = MinValue(myMas);
Console.WriteLine("Min {0}", minVal);
Console.ReadKey();
}
}