Addition of c++ mode calculation program