Esempio n. 1
0
        static void Main()
        {
            Console.WriteLine("Задание 1");
            Login();
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 2");
            MessangeWork();
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 3");
            EqualWork();
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 4");
            WorstStudents();
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 5");
            Quest();
            My_methods.Pause();
            Console.Clear();
        }
Esempio n. 2
0
        static void Main()
        {
            Console.WriteLine("Задание 1");
            //Продемонстрировать работу на функции с функцией a*x^2 и функцией a*sin(x)
            Console.WriteLine("Таблица функции a*x^2:");
            Table(delegate(double a, double x) { return(a * x * x); }, 2, 1, 3);

            Console.WriteLine("Таблица функции a*sin(x):");
            Table(delegate(double a, double x) { return(a * Math.Sin(x)); }, 2, 1, 3);
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 2");
            Menu();
            My_methods.Pause();
            Console.Clear();

            Console.WriteLine("Задание 3");
            StudentsArr stlist = new StudentsArr("..\\..\\st.csv");

            Console.WriteLine(stlist.ToString());
            Console.WriteLine(stlist.FrequencyArray());
            My_methods.Pause();
            Console.WriteLine($"Количество учащихся 5-6 курса: {stlist.FindFifthUp()}");
            My_methods.Pause();
            stlist.SortAge();
            Console.WriteLine("Сортировка по возрасту\n" + stlist.ToString());
            My_methods.Pause();
            stlist.SortCourseAge();
            Console.WriteLine("Сортировка по курсу и возрасту" + stlist.ToString());
            My_methods.Pause();
            List <Predicate <Student> > dic = new List <Predicate <Student> >();

            dic.Add(e => e.age >= 19);
            dic.Add(e => e.age < 21);
            dic.Add(e => e.course == 3);
            string s = StudentsArr.ListToString(stlist.SearchParamList(dic));

            Console.WriteLine(s);
            My_methods.Pause();
            Console.Clear();
        }