Advertisement
SergeyPGUTI

3.1.8

Sep 25th, 2015
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.63 KB | None | 0 0
  1. #include <iostream>
  2. #include <cmath>
  3.  
  4. using namespace std;
  5.  
  6. int main()
  7. {
  8.     int a,b,c,temp;
  9.     cin>>a>>b>>c;
  10.  
  11.     //в порядке возрастания
  12.     if (a>c)
  13.     {
  14.         temp=a;
  15.         a=c;
  16.         c=temp;
  17.     }
  18.     if (a>b)
  19.     {
  20.         temp=b;
  21.         b=a;
  22.         a=temp;
  23.     }
  24.     else if (b>c)
  25.     {
  26.         temp=b;
  27.         b=c;
  28.         c=temp;
  29.     }
  30.     if (c>=(a+b))
  31.     {
  32.         cout<<"impossible";
  33.     }
  34.  
  35.     else if (c*c==(b*b+a*a))
  36.     {
  37.         cout<<"right";
  38.     }
  39.     else if (c*c>(b*b+a*a))
  40.     {
  41.         cout<<"obtuse";
  42.     }
  43.     else cout<<"acute";
  44.  
  45.     return 0;
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement