Var x, y: real;
begin
writeln('Введите координаты точки x, y');
read(x, y);
if abs(x - 4) + abs(y - 4) <= 3 then writeln('Принадлежит')
else writeln('Не принадлежит')
end.
Using System;
namespace Cars{ public enum Direction { Left, Right }
public class TurnEventArgs : EventArgs { public TurnEventArgs(Direction direction) { Direction = direction; }
public Direction Direction { get; } }
public abstract class Car { public event EventHandler Started; public event EventHandler Stopped; public event EventHandler<TurnEventArgs> Turned;
public int Speed { get; set; } public string Color { get; set; } public string Name { get; set; } public virtual bool IsPolice => false;
public void Go() { Started?.Invoke(this, EventArgs.Empty); }
public void Stop() { Stopped?.Invoke(this, EventArgs.Empty); }
public void Turn(Direction direction) { Turned?.Invoke(this, new TurnEventArgs(direction)); } }
public class TownCar : Car { }
public class SportCar : Car { }
public class WorkCar : Car { }
public class PoliceCar : Car { public override bool IsPolice => true; }}
У робота есть пульт. Смотри в меню команда - показать пульт, с помощью него можно непосредственно управлять роботом, во вложении скриншот с пультом.