A: If you need the code,
see Turbo Pascal Numerical Toolbox and/or
Press & Flannery & Teukolsky & Vetterling (1986),
Numerical Recipes,
The Art of Scientific Computing, Cambridge University Press. The
Numerical Recipes codes are available as
/pc/turbopas/nrpas13.zip
(big, 404k!). If you just need to solve such a task (without code
available), get ftp://garbo.uwasa.fi/pc/ts/tsnum12.zip (or whatever
version number is the latest) from garbo.uwasa.fi archives by
anonymous FTP or mail server.