Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I am to write a program that prints out a bank statement .The program input is a

ID: 3536467 • Letter: I

Question

I am to write a program that prints out a bank statement .The program input is a sequence of transactions with each transaction having the following: day, amount, description. The program should read in the descriptions and then print out a statement listing all deposits, withdrawals and the daily balance for each day. Then compute the interest earned by the account. The minimum and average daily balances methods should be used for computing interest and print out both values. An interest rate of .5% per month with the assumption that each month has 30 days with the data sorted by date. The first entry is the form of: 1 1143.24 initial balance.

Please help I am bugging out on this problem.

Thanks

Explanation / Answer

#include <iostream>

#include <cmath>


using namespace std;


int main(){

float total,withdrawl,deposit;

float p = 11143.24;

float r = .05;

for(int day = 1;day <= 30;day++){


/* Reading deposits and withdrawls every day... */


cout << "enter amount to be deposited is: "<< endl;

cin >> deposit ;

cout << "enter amount to be withdrawn is: "<< endl;

cin >> withdrawl ;


cout << "for day " << day << " the deposited amount is " << deposit << endl;

cout << "for day " << day << " the withdrawn amount is " << withdrawl << endl;

p = p + (deposit - withdrawl);

total = p * pow(1+r,day);

cout << "for day " << day << " the total amount is " << total << endl;

}

}

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote