예제 #1
0
        public static void Main()
        {
            Console.WriteLine(CalcTriangleArea(3, 4, 5));

            Console.WriteLine(DigitToEnglishWord(5));

            Console.WriteLine(FindMax(5, -1, 3, 2, 14, 2, 3));

            Print.AsFloatNumber(1.3);
            Print.AsPercent(0.75);
            Print.RightAlignedNumber(2.30);

            Point firstPoint = new Point() { X = 3, Y = -1 };
            Point secondPoint = new Point() { X = 3, Y = 2.5 };

            Console.WriteLine(CalculateDistance(firstPoint, secondPoint));
            Console.WriteLine("Horizontal? " + IsHorizontalLine(firstPoint, secondPoint));
            Console.WriteLine("Vertical? " + IsVerticalLine(firstPoint, secondPoint));

            Student peter = new Student("Peter", "Ivanov", "From Sofia, born at 17.03.1992");

            Student stella = new Student("Stella", "Markova", "From Vidin, gamer, high results, born at 03.11.1993");

            Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.BirthDate().IsEarlierThan(stella.BirthDate()));
        }