//lending.cpp #include using namespace std; //function prototypes bool borrow(float limit, float & current_debt); //limit and current_debt are PARAMETERS void introduction(float line_of_credit); //no return value, one parameter int main() { float debt_limit=1000.00; introduction(debt_limit); //FUNCTION CALL //debt_limit is the ARGUMENT float debt=0; cout << "Would you like to borrow? (y or n)" << endl; char choice; cin >> choice; while (choice == 'y') { bool success; success = borrow(debt_limit, debt); //function CALL //debt_limit and debt are the ARGUMENTS. //success is assigned the RETURN VALUE. if (success) cout << "Another loan? (y or n)"; else cout << "Try another amount? (y or n)"; cin >> choice; } //end while cout << "Come again!"; return 0; } //end main //function implementation (definition) bool borrow(float limit, float & current_debt) { float loan; //local to this function cout << "How much would you like to borrow? $"; cin >> loan; if (loan + current_debt <= limit) { current_debt += loan; //current_debt=current_debt+loan cout << "Here is your loan of $" << loan << endl; return true; } //end then clause else //exceeds limit { cout << "I cannot make that loan.\n " << "Your current debt is too near your debt limit." << endl; return false; } } //end borrow void introduction(float line_of_credit) { cout << "Welcome to the House of Money." << endl; cout <<"Your line of credit is: $" << line_of_credit<