help with homework

i need to make a atm like program for my college class. i cannot get this thing to work. i'm not a programmer so bear with me

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#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 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;
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;
}



Topic archived. No new replies allowed.