var a,b,c,m,n:integer;
BEGIN
write('Длина шкафа = ');
readln(c);
write('Ширина шкафа = ');
readln(a);
write('Высота шкафа = ');
readln(b);
write('Длина двери = ');
readln(m);
write('Ширина двери = ');
readln(n);
if ((a*b<=m*n) and (((a<=m) and (b<=n)) or ((a<=n) and (b<=m)))) or
((a*c<=m*n) and (((a<=m) and (c<=n)) or ((a<=n) and (c<=m)))) or
((c*b<=m*n) and (((c<=m) and (b<=n)) or ((c<=n) and (b<=m)))) then
writeln('ДА') else
writeln('НЕТ');
end.
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
var a,b,c,m,n:integer;
BEGIN
write('Длина шкафа = ');
readln(c);
write('Ширина шкафа = ');
readln(a);
write('Высота шкафа = ');
readln(b);
write('Длина двери = ');
readln(m);
write('Ширина двери = ');
readln(n);
if ((a*b<=m*n) and (((a<=m) and (b<=n)) or ((a<=n) and (b<=m)))) or
((a*c<=m*n) and (((a<=m) and (c<=n)) or ((a<=n) and (c<=m)))) or
((c*b<=m*n) and (((c<=m) and (b<=n)) or ((c<=n) and (b<=m)))) then
writeln('ДА') else
writeln('НЕТ');
end.