You do not have to type these in and run them. Just make sure they are legible (and correct!). As with any piece of paper you turn in, include your name, ID, section number, and date.
1. Write a function which tells how far a point is from the origin.
2. Write a function, which, given two points, tells you the x and y coordinates of the point closer to the origin.
3. Suppose we have 3 arrays, which together represent points. One array contains the x-coordinates, one array contains the y-coordinates, and one array contains the color. Write a function which, given three such arrays, gives back the x and y coordinates of the RED point closest to the origin. If there are no RED points, give back coordinate values of the origin. (Assume RED is a known #define constant).