in main create a variable total or something like that and set it to equal GetAmountSpent(). have the getAmountSpent() function add up the totals and return that total. then in main pass total(or whatever you named the variable) as a parameter to getBudgetReport() so you can use it in the function and do whatever you want with it.