Exemplo n.º 1
0
        static void Main(string[] args)
        {
            Student Info = new Student(Console.ReadLine(), Console.ReadLine());

            //считваем с кансоли данные

            for (int i = 0; i < 4; i++)
            //создаем цикл, который будет повторяться 4 раза(4 года обучения)
            {
                Console.WriteLine(Info.GetName()); //вызываем функцию, которая будет возварщать имя


                Console.WriteLine(Info.GetId());
                //вызываем функцию, которая будет возвращать айди

                Console.WriteLine(Info.GetYear());//вызываем функцию, которая будет возваращать увеличенный год обучения
            }
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //считваем с кансоли данные
            Student Info = new Student("Nazerke", "18BD111074");

            //создаем цикл, который будет повторяться 4 раза(4 года обучения)
            for (int i = 0; i < 4; i++)
            {
                //вызываем функцию, которая будет возвращать имя
                Console.WriteLine(Info.GetName());

                //вызываем функцию, которая будет возвращать айди
                Console.WriteLine(Info.GetId());

                //вызываем функцию, которая будет возвраащать увеличенный год обучения
                Console.WriteLine(Info.GetYear());
            }
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            //read data from the console
            Student Info = new Student(Console.ReadLine(), Console.ReadLine());

            //create a loop that will be repeated 4 times (4 years of study)
            for (int i = 0; i < 4; i++)
            {
                //call the function that returns the name
                Console.WriteLine(Info.GetName());

                //call the function that returns the id
                Console.WriteLine(Info.GetId());

                //call the function that returns the increased study year
                Console.WriteLine(Info.GetYear());
            }
            Console.ReadKey(true);
        }