Develop an algorithm to find all the fifth Thursdays of those months that have them, and set it to calculate them for ten years. You are given subroutines that convert Gregorian calendar dates to and from JD numbers, which are the number of days a given date is past a certain fixed date in the distant past (more than 6000 years ago). You also have a 2003 calendar available that tells you Jan. 2, 2003 was a Thursday.