The inverse calculation program for Programming Assignment 2