Yes, you can modify the program by adding the specific acceleration due to gravity for the celestial body you're interested in. Simply include the desired value in the function calls within the main function.