I am having issues here and trying to figure out where I went wrong. Any help would be appreciated. So far I have this code but getting a couple errors near the end. Basically the last four conditions when I'm supposed to be over the minimum balance. Thanks for all your help. I'm rather stumped right now and don't know how to proceed to make this work. I absolutely need to have the const doubles in there as part of this program.
When I run the program though it takes it right to the end like in a loop instead of calculating correctly. Here is what it does:
" Please enter the balance of your checking account: 342.51
Enter the number of checks written this month: The service charge for the month is $ 10Program ended with exit code: 0"
Line 22: balance is an int. If you try to enter 342.51, only the 342 is read. the ".51" is left in the cin buffer. Then at line 34 when you try to cin checks which is also an int, the cin fails because "." is the next character in the cin buffer and is not a valid character for an int.
If you want to enter decimal numbers, change balance to a double