uses crt; var a, b, c:integer; begin clrscr; write (‘nhap canh thu nhat: ‘); readln (a); write (‘nhap canh thu hai: ‘); readln (b); write (‘nhap canh thu ba: ‘); readln (c); if (a+b>c) and (b+c>a) and (a+c>b) then begin if (a*a=b*b+c*c) or (b*b=a*a+c*c) or (c*c=a*a+b*b) then begin writeln (‘DAY LA TAM GIAC VUONG’); readln; end else if (a=b) or (b=c) or (c=a) then begin writeln (‘DAY LA TAM GIAC CAN’); readln; end else if (a=b) and (b=c) then begin writeln (‘DAY LA TAM GIAC DEU’); readln; end else begin if (a*a=b*b+c*c) and (b=c) or (b*b=a*a+c*c) and (c=a) or (c*c=a*a+b*b) and (a=b) then writeln (‘DAY LA TAM GIAC VUONG CAN’); readln; readln; end; end else begin if (a+b>c) and (b+c>a) and (a+c>b) then writeln (‘DAY LA TAM GIAC THUONG’); begin writeln (‘BA CANH NAY KHONG THE TAO THANH MOT TAM GIAC !!! VUI LONG NHAP LAI !!!’); readln; end; end; end.
uses crt;
var a,b,c:real;
begin
clrscr;
repeat
write(‘Nhap a=’); readln(a);
write(‘Nhap b=’); readln(b);
write(‘Nhap c=’); readln(c);
until (a>0) and (b>0) and (c>0);
if (a+b>c) and (a+c>b) and (b+c>a) then
begin
if (a=b) and (b=c) then writeln(‘Day la tam giac deu’)
else writeln(‘Day la tam giac khong deu’);
end
else writeln(‘Day khong la ba canh trong mot tam giac’);
readln;
end.
uses crt;
var a, b, c:integer;
begin
clrscr;
write (‘nhap canh thu nhat: ‘); readln (a);
write (‘nhap canh thu hai: ‘); readln (b);
write (‘nhap canh thu ba: ‘); readln (c);
if (a+b>c) and (b+c>a) and (a+c>b) then
begin
if (a*a=b*b+c*c) or (b*b=a*a+c*c) or (c*c=a*a+b*b) then
begin
writeln (‘DAY LA TAM GIAC VUONG’);
readln;
end
else
if (a=b) or (b=c) or (c=a) then
begin
writeln (‘DAY LA TAM GIAC CAN’);
readln;
end
else
if (a=b) and (b=c) then
begin
writeln (‘DAY LA TAM GIAC DEU’);
readln;
end
else
begin
if (a*a=b*b+c*c) and (b=c) or (b*b=a*a+c*c) and (c=a) or (c*c=a*a+b*b) and (a=b) then
writeln (‘DAY LA TAM GIAC VUONG CAN’);
readln;
readln;
end;
end
else
begin
if (a+b>c) and (b+c>a) and (a+c>b) then
writeln (‘DAY LA TAM GIAC THUONG’);
begin
writeln (‘BA CANH NAY KHONG THE TAO THANH MOT TAM GIAC !!! VUI LONG NHAP LAI !!!’);
readln;
end;
end;
end.