C# Program :A user enters 3 sides of a traingle, find which traingle can be made using those 3 sides

Sunday, 12 February 2012

Code:
using System;
class Traingle
{
    public static void Main()
    {
        float a,b,c;
        Console.WriteLine("Enter Three Sides Of A Traingle:");
        a=float.Parse(Console.ReadLine());
        b=float.Parse(Console.ReadLine());
        c=float.Parse(Console.ReadLine());
        if(a==b && b==c)
        {
            Console.WriteLine("The Traingle is an Equilateral Traingle");
        }
        else if((a==b) || (b==c) || (c==a))
        {
            Console.WriteLine("The Traingle is an Isosceles Traingle");       
         }
         else
         {
            Console.WriteLine("The Traingle is an Scalen Traingle");       
         }
    }
}
Output:-