На Pascal:
uses crt;
var a, h, a1, h1, S, S1:real;
begin
write('a='); read(a);
write('h='); read(h);
write('a1='); read(a1);
write('h1='); read(h1);
S:=0.5*a*h; S1:=0.5*a1*h1;
if S>S1 then write('S 1-ого треуг. больше и = ',S)
else write('S 2-ого труг. больше и = ',S1);
end.