Nayeemzaman

Triangle

Jan 11th, 2019
168
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     long long int a,b,c,i,x,y,z;
  6.     cin >> a >> b >> c;
  7.     x = max(a,max(b,c));
  8.     y = max(a,min(b,c));
  9.     z =a+b+c-x-y;
  10.     if(x>=y+z)
  11.         cout << "Invalido" << endl;
  12.     else
  13.     {
  14.         if(x==z && z==y)
  15.             cout << "Valido-Equilatero" <<endl;
  16.         else if(x!=y && y!=z && x!=z)
  17.             cout << "Valido-Escaleno" << endl;
  18.         else
  19.             cout << "Valido-Isoceles" << endl;
  20.         if(x*x==(y*y+z*z))
  21.             cout << "Retangulo: S" << endl;
  22.         else
  23.             cout << "Retangulo: N" << endl;
  24.     }
  25.     return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment