/****************************************************************************** Welcome to GDB Online. GDB online is an online compiler and debugger tool for C, C++, Python, PHP, Ruby, C#, VB, Perl, Swift, Prolog, Javascript, Pascal, HTML, CSS, JS Code, Compile, Run and Debug online from anywhere in world. *******************************************************************************/ #include #include using namespace std; int main() { int a,b,c; cout << "Zadej stranu a:"; cin >> a; cout << endl << "Zadej stranu b:"; cin >> b; cout << endl << "Zadej stranu c:"; cin >> c; if (a+b>c & b+c>a & a+c>b) { if (a==b & b==c) {cout << endl << "Rovnostranny trojuhelnik"; } else { if (a==b | b==c | c==a) { if (a*a+b*b==c*c | b*b+c*c==a*a | c*c+a*a==b*b) {cout << endl << "Rovnoramenny a pravouhly trojuhelnik"; } else {cout << endl << "Rovnoramenny trojuhelnik";} } else { if (a*a+b*b==c*c | b*b+c*c==a*a | c*c+a*a==b*b) {cout << endl << "Pravouhly trojuhelnik"; } else {cout << endl << "Obecny trojuhelnik"; } } } } else {cout << endl << "Toto neni trojuhelnik"; } return 0; }