I am trying to keep my balance and make it loop for 5 times then give the current balance. What did I do wrong? Also is this what a five-element one-dimensional array is? I dont have my book with me so I'm running into problems. thanks
Code:#include <iostream> using namespace std; int main() { float InitBal; float CheckAmount; float DepositAmount; float CurBal; cout << "Enter Initial Balance of 1st Customer that banks with Bank Of Bryan:"; cin >> InitBal; cout << "Write A Check For A Specified Amount:"; cin >> CheckAmount; cout << "Deposit A Specified Amount Into The Checking Account:"; cin >> DepositAmount; CurBal = InitBal - CheckAmount + DepositAmount; for(int i=0;i<=5;i++) { cout << "The current balance of this customer is:" << CurBal << endl; } return 0; }