It keeps telling me ( error CS1525: Unexpected symbol `else' ) and I can't find the error! Help!! here is my code,it keeps telling me ( error CS1525: Unexpected symbol `else' ) and I can't find the error!

int x=int.Parse(Console.WriteLine("what’s the first side? "));
int y=int.Parse(Console.WriteLine(“what’s the second side?”));
int z=int.Parse(Console.WriteLine(“what’s the third side?”));

if (x+y>z || x+z>y || y+z>x)

 {if (x==y && y==z && z==x)

 Console.WriteLine("x="+x);
 Console.WriteLine("y="+y);
 Console.WriteLine("z="+z);
 Console.WriteLine("The triangle is Equilateral");

  else if (x==y ||x==z ||y==z )
 Console.WriteLine("x="+x);
 Console.WriteLine("y="+y);
 Console.WriteLine("z="+z);
 Console.WriteLine("The triangle is Isosceles");


  else
 Console.WriteLine("x="+x);
 Console.WriteLine("y="+y);
 Console.WriteLine("z="+z);
 Console.WriteLine("The triangle is Scalene");
 }

else
Console.WriteLine(“x=”+x);
Console.WriteLine(“y=”+y);
Console.WriteLine(“z=”+z);
Console.WriteLine(“Not a triangle”);

This is a misunderstanding of C# syntax. If you have blocks of code to execute after an “if” then you should include that block in braces { }.

Without braces, only the following line is part of the if statement. Your “else” is hanging because there is no if statement to which it is attached. Just put braces around the code blocks and you’ll be fine…