If not doing C++;just change this


double mileage_calculator(double &d)


to this


double mileage_calculator(double d)