Update hw3b.c

Much more accurate locating function