Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main(){
- double a,b,c,aux;
- cin>>a>>b>>c;
- if(a>b&&b>c)
- a=a;
- else if(b>a&&a>c){
- aux=a;
- a=b;
- b=aux;
- }else{
- aux=a;
- a=c;
- c=aux;
- }
- if(a>=b+c)
- cout<<"NAO FORMA TRIANGULO"<<endl;
- else{
- if(a*a==b*b+c*c)
- cout<<"TRIANGULO RETANGULO"<<endl;
- if(a*a>b*b+c*c)
- cout<<"TRIANGULO OBTUSANGULO"<<endl;
- if(a*a<b*b+c*c)
- cout<<"TRIANGULO ACUTANGULO"<<endl;
- if(a==b&&b==c)
- cout<<"TRIANGULO EQUILATERO"<<endl;
- if(a==b&&c!=a||c==b&&b!=a||a==c&&a!=b)
- cout<<"TRIANGULO ISOSCELES"<<endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement