// Includes
#include "stdafx.h"
#include <iostream>
usingnamespace 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);
elseif (checks >= 21 && checks <= 39)
second = (checks * fee2) + first;
elseif (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