C# Program - Check the type of triangle | Digital Infotainment

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApplication1
    class Program
        static void Main(string[] args)
            int a,b,c;
            Console.Write("Enter 3 side of the triangle");
            a = int.Parse(Console.ReadLine());
            b = int.Parse(Console.ReadLine());
            c = int.Parse(Console.ReadLine());
            if (a == b && b == c)
                Console.Write("The triangle is equilateral");
            else if (a != b && b != c)
                Console.Write("The triangle is scalene");
                Console.Write("The triangle is issocelles");

/*Do leave a comment if you find this useful*/

No comments:

Post a Comment