// program to test nature of a triangle, given the sides


#include <iostream.h>

int main (void)
{ int side1, side2, side3;
cout << "This program determines the type of triangle formed from given sides"
     << endl;

 cout << "Enter the sizes of the three sides: ";

 cin >> side1 >> side2 >> side3;

 if (side1 <= 0)
   { cout << "sides must have positive lengths" << endl;
     return 0;}

 if (side1 + side2 <= side3)
   { cout << "two sides not long enough to make a triangle" << endl;
     return 0;}

 if ((side1 == side2) && (side2 == side3))
   { cout << "triangle is equilateral" << endl;
   return 0;}

 if (side1 == side2)
   cout << "triangle is isoceles (but not equilateral)" << endl;
 else cout << "triangle is scalene" << endl;

}
