This code interpolates at the required x using the aitken neville method. Currently, the number of input points are restricted to 5. Making it depend on user's choice is the next step. I'd prefer not to use the vector class for the same. If you want it's fortran code drop me a mail.
If you want to make any changes to the above code, feel free to join.