A program to find speed in a cartesian plane using struct