Check if it's a square or rectangle I want to check in my if and else if statement if the inputs form a square or a rectangle, now my if and else if statements seems to be unreadable, now I'm thinking of ways to improve it.       

  /* input are angles in degrees, 1st side is parallel to 3rd side, 2nd side is parallel to 4th side*/    
  static void Main(string[] args)
  {
     Console.Write("Input first: ");
     int first = int.Parse(Console.ReadLine());

     Console.Write("Input second: ");
     int second = int.Parse(Console.ReadLine());

     Console.Write("Input third: ");
     int third = int.Parse(Console.ReadLine());

     Console.Write("Input fourth: ");
     int fourth = int.Parse(Console.ReadLine());

     // all sides are equal
     // logic for if and else-if, needs codereview for improvement
     if (first == second &amp;&amp; first == third &amp;&amp; first == fourth &amp;&amp; second == third &amp;&amp; second == fourth &amp;&amp; third == fourth)
     {
        Console.WriteLine("Square");
     }
     else if (first != second &amp;&amp; first == third &amp;&amp; first != fourth &amp;&amp; second != third &amp;&amp; second == fourth )
     {
        Console.WriteLine("Rectangle");
     }
     else
     {
        Console.WriteLine("Not a square nor a rectangle");
     }

     Console.ReadKey();
  }
Simplify the if by just doing

if (first == second &amp;&amp; second == third &amp;&amp; third == fourth)
{....}


You said the inputs are degrees, now it’s been awhile since geometry but squares and rectangles are determined by length of side, not angle degree. Both are 4 sided objects so every angle is the same (unless you’re talking about something like a trapezoid, rhombus).