hi everyone! i almost have my program finished (pretty surprised i actually do lol) but i'm having a couple problems. this is what the program should do (copied straight out of the textbook)
a bank charges $10 per month plus the following check fees for a commercial checking account:
$.10 for less than 20 checks
$.08 each for 20-39 checks
$.06 each for 40-59 checks
$.04 each for 60 or more checks.
the bank also charges an extra $15 if the balance of the account falls below $400 (before any check fees are applied.) write a program that asks for the the beginning balance and the number of checks written. compute and display the bank's service fees for the month.
input validation: do not accept a negative value for the number of checks written. if a negative value is given for the beginning balance, display an urgent message indicating the account is over drawn.
i'm having a problem with adding the initial $15 if the balance is under $400 and displaying the message if the balance is negative.
here is the code i have for this part of the program:
Code:
// Calculate bank fees based on amount of checks user inputs.
// if (balance <= 400)
// fee = 15 + (
if (checks < 20)
fee = checks * .10;
else if (checks < 39)
fee = checks * .08;
else if (checks < 59)
fee = checks * .06;
else if (checks >= 60)
fee = checks * .04;
else if (checks <= 0)
{
cout << "Your account is overdrawn! \n";
cout << "Number of checks must be zero or more. \n";
}
the first three lines are commented out because i know they're wrong from trying to run the program. could anyone help me out by giving me some possible suggestions?? thank you