Implement a C program that can be used to simulate a vacuum cleaner robot.
Such a robot moves on a plane with obstacles (walls, objects) to which it must evade. It has a
sensor in the direction of travel. The robot can rotate clockwise in 90 degree increments,
which changes the direction of travel and move forward in the direction of travel.
Movements are measured in increments (one step is a predefined distance). It has a battery
that is reduced by 1% per step or per turn. It also has a dust container with a capacity of 100
units of dust. If the battery is empty, the robot will stop. If the dust container is full, the
suction power decreases: the battery consumption increases to 2% per step. 5% points
before the end of each capacity, the robot will give a warning message. At startup, the
battery level as well as the function duration (= Number of steps to be performed) are
specified, and a plan of the room to be cleaned is read out via an external file. The robot
then randomly moves through the room. Each action is displayed on the screen. The
traversed path is documented-starting from a freely selectable start position.