Nhap 3 so tu ban phimkiem tra xem do co phai la do dai 3 cua tam giac 27/08/2021 Bởi Elliana Nhap 3 so tu ban phimkiem tra xem do co phai la do dai 3 cua tam giac
uses crt; var a,b,c: byte; Begin clrscr; writeln(‘Nhap cac so tu nhien:’); write(‘a=’); readln(a); write(‘b=’); readln(b); write(‘c=’); readln(c); if (a+b>=c) and (a+c>=b) and (b+c>=a) then writeln(‘Cac so da nhap la do dai 3 canh cua tam giac.’) else writeln(‘Khong phai do dai 3 canh cua tam giac.’); readln end. Bình luận
uses crt;
var a,b,c: byte;
Begin
clrscr;
writeln(‘Nhap cac so tu nhien:’);
write(‘a=’); readln(a);
write(‘b=’); readln(b);
write(‘c=’); readln(c);
if (a+b>=c) and (a+c>=b) and (b+c>=a) then
writeln(‘Cac so da nhap la do dai 3 canh cua tam giac.’)
else writeln(‘Khong phai do dai 3 canh cua tam giac.’);
readln
end.