Răspunsuri

2014-11-09T16:14:09+02:00
#include <iostream>
using namespace std;
int main()
{ int a,b,c,triunghi;
triunghi=0;
cout<<"a=";
cin>>a;
cout<<"b=";
cin>>b;
cout<<"c=";
cin>>c;
if((a>0) && (b>0) && (c>0) &&( (a+b>c) ||(a+c>b)|| (b+c>a)))   
 triunghi=1;
if(triunghi==1)
{    if((a==b)&& (b==c))
cout<<"triunghi echilateral\n";
else 
if((a==b)||(a==c)||(b==c))   
cout<<"triunghi isoscel\n";}
  if((a*a==b*b+c*c )||(b*b==c*c+a*a)||(c*c==b*b+a*a))   
 cout<<"triunghi dreptunghic\n";
    if((a!=b)&& (a!=c)&&(b!=c)) 
  cout<<"triunghi oarecare\n"; 
 return 0;}