using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace _42768
{
class Program
{
static void Main(string[] args)
{
int size;//array size
Console.Write("Array size: ");
size = Convert.ToInt32(Console.ReadLine());
double[] arr = new double[size];//array
//reading array from keyboard
for(int i = 0; i < size; i++)
{
Console.Write("Array element #" + (i+1) + ": ");
arr[i] = Convert.ToDouble(Console.ReadLine());
}
//max and min
Console.WriteLine("Max = " + arr.Max());
Console.WriteLine("Min = " + arr.Min());
}
}
}
Comments
Leave a comment