コード例 #1
0
        public static void Main()
        {
            Console.WriteLine("Give us Side A: ");
            string stringSideA = Console.ReadLine();
            int    sideA       = int.Parse(stringSideA);

            Console.WriteLine("Give us Side B: ");
            string stringSideB = Console.ReadLine();
            int    sideB       = int.Parse(stringSideB);

            Console.WriteLine("Give us Side C: ");
            string stringSideC = Console.ReadLine();
            int    sideC       = int.Parse(stringSideC);

            TriangleTracker tri    = new TriangleTracker();
            string          output = tri.IsTriangleTracker(sideA, sideB, sideC);

            Console.WriteLine(output);
        }
コード例 #2
0
        public void isTriangle_NotTriangle_true()
        {
            TriangleTracker testTriangle = new TriangleTracker();

            Assert.AreEqual(true, testTriangle.IsTriangleTracker(7, 6, 15));
        }
コード例 #3
0
        public void isTriangle_Scalene_true()
        {
            TriangleTracker testTriangle = new TriangleTracker();

            Assert.AreEqual(true, testTriangle.IsTriangleTracker(100, 123, 232));
        }
コード例 #4
0
        public void isTriangle_Isoceles_true()
        {
            TriangleTracker testTriangle = new TriangleTracker();

            Assert.AreEqual(true, testTriangle.IsTriangleTracker(2, 2, 3));
        }
コード例 #5
0
        public void IsTriangle_Equilateral_true()
        {
            TriangleTracker testTriangle = new TriangleTracker();

            Assert.AreEqual(true, testTriangle.IsTriangleTracker(3, 3, 3));
        }