Advertisement
Guest User

gustavo

a guest
Apr 20th, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.68 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3. int main(){
  4.     double a,b,c,aux;
  5.     cin>>a>>b>>c;
  6.     if(a>b&&b>c)
  7.         a=a;
  8.     else if(b>a&&a>c){
  9.         aux=a;
  10.         a=b;
  11.         b=aux;
  12.     }else{
  13.         aux=a;
  14.         a=c;
  15.         c=aux;
  16.     }
  17.     if(a>=b+c)
  18.         cout<<"NAO FORMA TRIANGULO"<<endl;
  19.     if(a*a==b*b+c*c)
  20.         cout<<"TRIANGULO RETANGULO"<<endl;
  21.     if(a*a>b*b+c*c&&)
  22.         cout<<"TRIANGULO OBTUSANGULO"<<endl;
  23.     if(a*a<b*b+c*c)
  24.         cout<<"TRIANGULO ACUTANGULO"<<endl;
  25.     if(a==b&&b==c)
  26.         cout<<"TRIANGULO EQUILATERO"<<endl;
  27.     if(a==b&&c!=a||c==b&&b!=a||a==c&&a!=b)
  28.         cout<<"TRIANGULO ISOSCELES"<<endl;
  29.     return 0;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement