Funciton to compute the leap year and the while loop to compute the years between