### Bank Charges Program

 ``12345678910111213141516171819202122232425262728293031323334353637383940414243444546`` ``````// Includes #include "stdafx.h" #include using namespace std; // Main Function int main() { float perMONTH = 10; double first , second , third , fourth , totalfee; double fee1 = .10, fee2 = .08, fee3 = .06, fee4 = .04; int checks; cout << "This is a bank charge program.\n\n"; cout << "Enter the amount of checks you wrote this month: "; cin >> checks; while (checks < 0) { cout << "\n\nChecks must be greater than 0.\n\n"; cout << "Enter the amount of checks you wrote this month: "; cin >> checks; } if (checks <= 20) first = (checks * fee1); else if (checks >= 21 && checks <= 39) second = (checks * fee2) + first; else if (checks >= 40 && checks <= 59) third = (checks * fee3) + first + second; else fourth = (checks * fee4) + first + second + third; totalfee = (perMONTH + first + second + third + fourth); cout << "\n\n"; cout << "Your total fee is \$" << totalfee << endl; cout << endl << "Press ENTER to exit.."; cin.clear(); cin.sync(); cin.get(); return 0; }``````

can anyone tell me why im getting thee errors

uninitialized local variable first used on line 29
uninitialized local variable second used on line 31
uninitialized local variable third on used line 33
Last edited on
`second = (checks * fee2) + first;`

What is the value of first at this point?
Topic archived. No new replies allowed.