Write a program that allows user to enter a dollar amount for theirbank account
ID: 3613025 • Letter: W
Question
Write a program that allows user to enter a dollar amount for theirbank account balance at the beginning of the month. Then ask theuser to enter dollar amounts for any number of checks written in amonth, upto 50. Store the amounts in an array and count the entriesas the use makes them. Finally ask the user to enter a monthlyinterest rate if the account is interest bearing or a 0 if it isnot , if the user enters 0 for the inerest rate, then call afunction named balance accounts() that accepts the beginningbalance, number of checks and array of check amount as arguments;the function prints a report that shows the running total of thebank account balance as each check is subtracted. (similar to amonth end bank statment) . It also prints the final balance afterall the checks have been subtracted from the beginning balance. Ifthe user enters a nuber other then 0 for the intrest rate, thencall an overloaded function named balanceaccount() that accepts thebeginning balance, number of checks, the array of amounts of checksand the intrest rate as an arguments. This function prints exactsame report and then computes a final month end balance by applyingthe interest that the bank account has accrued.Explanation / Answer
please rate - thanks #include #include using namespace std; void balanceaccounts(float, int, float[]); void balanceaccounts(float, int, float[], float); int main() {float balance, items[50],interest; int num=0; coutbalance; coutitems[num]; while(num0) {num++; coutitems[num]; } coutinterest; if(interest==0) balanceaccounts(balance,num,items); else balanceaccounts(balance,num,items,interest); system("pause"); return 0; } void balanceaccounts(float balance,int num,float items[]) {int i; coutRelated Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.