1:
procedure nhap(var a,b,c:real);
begin
Repeat
write('Nhap canh thu nhat:'); readln(a);
write('Nhap canh thu hai:'); readln(b);
write('Nhap canh thu ba:'); readln(c);
Until (a>0) and (b>0) and (c>0) and (a+b>c) and (a+c>b) and (b+c>a);
end;
2:
function max(var x,y:real):real;
begin
max:=x;
if max<y then max:=y;
end;