示例#1
0
        static Entrant[] ReadEntratntArray()
        {
            Console.WriteLine("Введіть кількість записів");
            int n = Convert.ToInt32(Console.ReadLine());

            Entrant[] mas = new Entrant[n];
            ZNO[]     res = new ZNO[3];
            for (int i = 0; i < n; i++)
            {
                Console.WriteLine("Введіть ім'я:");
                mas[i].Name = Console.ReadLine();
                Console.WriteLine("Введіть id:");
                mas[i].IdNum = Convert.ToInt32(Console.ReadLine());
                Console.WriteLine("Введіть бали за підготовчі курси");
                mas[i].CoursePoints = Convert.ToDouble(Console.ReadLine());
                Console.WriteLine("Введіть бали атестату");
                mas[i].AvgPoints = Convert.ToDouble(Console.ReadLine());
                for (int j = 0; j < 3; j++)
                {
                    Console.WriteLine("Введіть назву предметів ЗНО");
                    res[j].Subject = Console.ReadLine();
                    Console.WriteLine("Введіть отримані бали");
                    res[j].Points     = Convert.ToInt32(Console.ReadLine());
                    mas[i].ZNOResults = res;
                }
            }

            return(mas);
        }
示例#2
0
        static void Main(string[] args)
        {
            Entrant[] entrant = new Entrant[2];
            double    max, min;

            entrant = ReadEntratntArray();
            PrintEntrant(entrant);
            GetEntrantsInfo(entrant, out max, out min);
            Console.WriteLine($"max resalt - {max} min result - {min}");
        }