Помогите пожалуйста в системе Pascal ABC выполнить проверяемое задание if3
Answers & Comments
pacixor
Uses robot; begin Task('if3'); if (WallFromRight and WallFromDown) then begin Left; Up; end else if (WallFromDown and WallFromLeft) then begin Up; Right; end else if (WallFromLeft and WallFromUp) then begin Right; Down; end else if (WallFromUp and WallFromRight) then begin Down; Left; end; Paint; end.
Answers & Comments
begin
Task('if3');
if (WallFromRight and WallFromDown) then
begin
Left; Up;
end
else
if (WallFromDown and WallFromLeft) then
begin
Up; Right;
end
else
if (WallFromLeft and WallFromUp) then
begin
Right; Down;
end
else
if (WallFromUp and WallFromRight) then
begin
Down; Left;
end;
Paint;
end.