int accumulate_salary(int month, int sum_of_salary) { // insert here the stop condition, returning the accumulated sum of salaries // insert here the recursion step, calling the function itself for the next month, with the updated sum of salaries }
int main() { cout << "sum of salaries " << accumulate_salary(1, 0) << endl; }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)