Here is todays problem.
You have a square grid extending infinitely in all directions. Your home is at point (hx,hy). You have to reach your college located at point (cx, cy). You can only travel parallel to the direction of the X or the Y axis and each step is 1 unit long. Write a program to find the number of steps between your home and your college.
Write it now. Test it. And come back later to check the solution.
Showing posts with label geometry. Show all posts
Showing posts with label geometry. Show all posts
Friday, May 2, 2008
Subscribe to:
Posts (Atom)