Sep 21, 2013 at 12:19pm UTC
here, i dont know if the supposed output but here...
#include <iostream>
#include <iomanip>
using namespace std;
int main(int argc, char *argv[])
{
//Declare Variables ex) datatype identifier;
double Withdrawal_Amt;
double INTEREST_RATE;
double Account_Balance;
double AccountBalance;
double Answer;
double ServiceCharge;
double OVERDRAFT_FEE;
double Charge;
INTEREST_RATE = .04;
OVERDRAFT_FEE = 25.00;
Charge = 300;
//Get Data
cout << "What is your account balance: " << "$";
cin >> Account_Balance;
cout << endl;
cout << "How much would you like to withdraw: " << "$";
cin >> Withdrawal_Amt;
cout << endl;
if ( Withdrawal_Amt > 500 ) {
cout<<"Requested over $500";
return 0;
}
else if ( Account_Balance <= 0 ) {
cout<<"Insufficient funds";
}
else if ( Withdrawal_Amt > Account_Balance ) {
cout<<"Insufficient balance.";
cout<<"If you withdraw, an overdraft fee of $25.00 will be charged.";
cout<<"Accept this charge? Type in y or n.";
cin >> Answer;
}
else if( Answer == 'n' ) {
return 0;
}
else if ( Answer == 'y' ) {
}
if ( Withdrawal_Amt > 300)
{ (ServiceCharge = ( Withdrawal_Amt / Charge ) * INTEREST_RATE);
}
else if (ServiceCharge = 0){
}
AccountBalance = Account_Balance / Withdrawal_Amt - ServiceCharge / OVERDRAFT_FEE;
cout << "Collect money" << "";
cout << endl;
return 0;
}