Exemplo n.º 1
0
 public static void Main(string[] args)
 {
     try
     {
         float[]      vertices = ParseArgs(args);
         TriangleType type     = DefineTriangleType(vertices[0], vertices[1], vertices[2]);
         PrintTriangleType(type);
     }
     catch (Exception exception)
     {
         Console.WriteLine(exception.Message);
         throw;
     }
 }
Exemplo n.º 2
0
 private static void PrintTriangleType(TriangleType type)
 {
     if (type == TriangleType.common)
     {
         Console.WriteLine("Triangle is common");
     }
     else if (type == TriangleType.none)
     {
         Console.WriteLine("That is not triangle");
     }
     else if (type == TriangleType.isosceles)
     {
         Console.WriteLine("Triangle is isosceles");
     }
     else if (type == TriangleType.equilateral)
     {
         Console.WriteLine("Triangle is equilateral");
     }
 }