//Bai 1
#include <bits/stdc++.h>
using namespace std;
class tg{
private:
float a,b,c,p;
public:
void nhap(){
cout<<"Cho tam giac abc, co:\n";
cout<<"Nhap a: "; cin>>a;
cout<<"Nhap b: "; cin>>b;
cout<<"Nhap c: "; cin >>c;
cout<<endl;
}
void xuat(){
cout<<"("<<a<<","<<b<<","<<c<<")\n";
}
string kt(){
if(a == b && b == c && c == a ) return "La tam giac deu\n";
if(a == b || b == c || c == a ) return "La tam giac can\n";
else if(a*a + b*b == c*c || a*a == b*b + c*c || b*b ==a*a +c*c )return"La tam giac vuong\n";
else return "La tam giac thuong.\n";
}
void tinh(){
p = (a+b+c)/2;
cout<<"Chu vi tam giac la: "<<p*2<<endl;
cout<<"Dien tich tam giac la: "<<sqrt(p*(p-a)*(p-b)*(p-c))<<endl;
}
};
int main(){
tg t;
t.nhap();
cout<<t.kt();
t.tinh();
}
Ly9CYWkgMQojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKY2xhc3MgdGd7CiAgICBwcml2YXRlOgogICAgICAgIGZsb2F0IGEsYixjLHA7CiAgICBwdWJsaWM6CiAgICAgICAgdm9pZCBuaGFwKCl7CiAgICAgICAgICAgIGNvdXQ8PCJDaG8gdGFtIGdpYWMgYWJjLCBjbzpcbiI7CiAgICAgICAgICAgIGNvdXQ8PCJOaGFwIGE6ICI7IGNpbj4+YTsKICAgICAgICAgICAgY291dDw8Ik5oYXAgYjogIjsgY2luPj5iOwogICAgICAgICAgICBjb3V0PDwiTmhhcCBjOiAiOyBjaW4gPj5jOwogICAgICAgICAgICBjb3V0PDxlbmRsOwogICAgICAgIH0KICAgICAgICB2b2lkIHh1YXQoKXsKICAgICAgICAJY291dDw8IigiPDxhPDwiLCI8PGI8PCIsIjw8Yzw8IilcbiI7CiAgICAgICAgfQogICAgICAgIHN0cmluZyBrdCgpewogICAgICAgICAgICBpZihhID09IGIgJiYgYiA9PSBjICYmIGMgPT0gYSApIHJldHVybiAiTGEgdGFtIGdpYWMgZGV1XG4iOwogICAgICAgICAgICBpZihhID09IGIgfHwgYiA9PSBjIHx8IGMgPT0gYSApIHJldHVybiAiTGEgdGFtIGdpYWMgY2FuXG4iOwogICAgICAgICAgICBlbHNlIGlmKGEqYSArIGIqYiA9PSBjKmMgfHwgYSphID09IGIqYiArIGMqYyB8fCBiKmIgPT1hKmEgK2MqYyApcmV0dXJuIkxhIHRhbSBnaWFjIHZ1b25nXG4iOwogICAgICAgICAgICAgICAgZWxzZSByZXR1cm4gIkxhIHRhbSBnaWFjIHRodW9uZy5cbiI7CiAgICAgICAgfQogICAgICAgIHZvaWQgdGluaCgpewogICAgICAgICAgICBwID0gKGErYitjKS8yOwogICAgICAgICAgICBjb3V0PDwiQ2h1IHZpIHRhbSBnaWFjIGxhOiAiPDxwKjI8PGVuZGw7CiAgICAgICAgICAgIGNvdXQ8PCJEaWVuIHRpY2ggdGFtIGdpYWMgbGE6ICI8PHNxcnQocCoocC1hKSoocC1iKSoocC1jKSk8PGVuZGw7CiAgICAgICAgfQp9OwppbnQgbWFpbigpewogICAgdGcgdDsKICAgIHQubmhhcCgpOwogICAgY291dDw8dC5rdCgpOwogICAgdC50aW5oKCk7Cgp9