fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. int a, b, c;
  6. cin >> a >> b >> c;
  7. bool esteEchilateral = (a == b && b == c);
  8. bool esteIsoscel = ((a == b || a == c || b == c) && !esteEchilateral);
  9. if (a > b) swap(a, b);
  10. if (b > c) swap(b, c);
  11. if (a > b) swap(a, b);
  12. bool esteDreptunghic = (c * c == a * a + b * b);
  13. cout << esteEchilateral << " " << esteIsoscel << " " << esteDreptunghic;
  14. return 0;
  15. }
  16.  
Success #stdin #stdout 0s 5268KB
stdin
5 3 4
stdout
0 0 1