Basic conversion program for distance and weight