public static void Main() { Console.WriteLine(CalculateTriangleArea(3, 4, 5)); Console.WriteLine(DigitToWord(5)); Console.WriteLine(FindMax(5, -1, 3, 2, 14, 2, 3)); PrintNumberInFormat(1.3, Format.Float); PrintNumberInFormat(0.75, Format.Percentage); PrintNumberInFormat(2.30, Format.RightAligned); double firstPointX = 3; double firstPointY = -1; double secondPointX = 3; double secondPointY = 2.5; Console.WriteLine(CalculateDistanceBetweenTwoPoints(firstPointX, firstPointY, secondPointX, secondPointY)); Console.WriteLine("Horizontal? {0}", IsLineHorizontal(firstPointY, secondPointY)); Console.WriteLine("Vertical? {0}", IsLineVertical(firstPointX, secondPointX)); Student peter = new Student("Peter", "Ivanov", new DateTime(1992, 3, 17)); peter.OtherInfo = "From Sofia"; Student stella = new Student("Stella", "Markova", new DateTime(1993, 11, 3)); stella.OtherInfo = "From Vidin, gamer, high results"; Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }
public static void Main() { Console.WriteLine(CalcTriangleArea(3, 4, 5)); Console.WriteLine(DigitName(5)); Console.WriteLine(FindMaxNumber(5, -1, 3, 2, 14, 2, 3)); PrintAsNumber(1.3, "f"); PrintAsNumber(0.75, "%"); PrintAsNumber(2.30, "r"); bool isVertical = false; bool isHorizontal = false; Console.WriteLine(CalcDistance(3, -1, 3, 2.5)); Console.WriteLine(IsVertical(3, 3, out isVertical)); Console.WriteLine(IsHorizontal(-1, 2.5, out isHorizontal)); Console.WriteLine("Vertical? " + isVertical); Console.WriteLine("Horizontal? " + isHorizontal); Student peter = new Student("Peter", "Ivanov", "17.03.1992", "From Sofia"); Student stella = new Student("Stella", "Markova", "03.11.1993", "From Vidin"); Console.WriteLine("{0} older than {1} -> {2}", peter.FirstName, stella.FirstName, peter.IsOlderThan(stella)); }