The DoD company has contracted to determine under what conditions a pair of scanner robots can collide. The robots are fired simultaneously from “guns” that are mounted near opposite ends of a horizontal strip. They travel in straight lines until they hit a wall of the strip or until they are in the same spot at the approximately the same time. Whenever a robot hits a wall, it bounces off without loss of speed and in a straight line so that the angle of incidence equals the angle of reflection. If the robots are in the same spot at approximately the same time, then they “collide.” Write a program to determine whether robots collide and if so where. To simplify the computer model of the physical problem, assume the following.
2/2 Output For each robot problem, output from your program should consist of the number of the problem (ex: ‘Robot Problem #1’, ‘Robot Problem #2’), and a statement indicating whether or not the robots do collide. If they do collide, your program should also print the coordinates of the point of collision. If there are multiple collisions, only print the first one. If there are multiple collisions at the same time, only print the one with smallest x-coordinate. All real output should be printed with 2 digits to the right of the decimal. Print a blank line after each robot problem. Notes: Assume that a = b only if |a − b| < ε = 10−7 To help maintain floating point accuracy when converting degrees to radians, use the predeclared constant pi. Sample Input 0 4 0 3.3 40 5 125 5 1 6 -5 10 5 2 95 20 2 5 45 5 42 5 -135 5 0 6 20 3 0 5 180 4 Sample Output Robot Problem #1: Robots do not collide. Robot Problem #2: Robots collide at (4.68,5.68) Robot Problem #3: Robots collide at (22.00,5.00) Robot Problem #4: Robots do not collide.