Question: Write a program to determine the location of a robot as it moves through a maze^1. The robot location controller will receive a series of

Write a program to determine the location of a robot as it moves through a maze^1. The robot location controller will receive a series of commands from the user. The program should prompt the user to enter the starting x and y coordinates for the robot. Then the program should prompt the user for commands until a "stop (s)" command is entered. If an invalid command is entered, the program should indicate that it is an invalid input and request another command. After each command the program should display the current position of the robot. At the end, the program should display the final position of the robot. Commands include: I - go left one space r - go right one space d - go down one space u -go up one space s - stop while ((ch = get char ()) ! = ' ' && ch ! = EOF); Sample output shown below (yours can be formatting differently). Test with different input values. Make sure to fully test your code and submit any necessary screen shots
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
