Use an else if statement like this one:
if (angles.Count() == 2 && sides.Count == 1)
{
// calculate based on two angles and one side
}
else if (angles.Count == 1 && sides.Count == 2)
{
// calculate based on one angle and two sides
}
else
{
MessageBox.Show(...)
}
1
solved If-else command in calculator [closed]