I have an assignment to write an ATM program (it just needs to be basic) and I am getting one error when I try to compile:
On line 28, I get an expected unqualified-id before '{'
.
I don't know that it's the only thing wrong with it, but any ideas would be great!
#include <iostream>
using namespace std;
int main()
{
int pin, option, i;
double balance = 1230.00;
double withdraw, deposit;
cout << "Please enter pin number: \n";
cin >> pin;
if (pin == 7230);
{ cout << "Pin Accepted \n";}
else
{ cout << "Please try again. \n"; }
}
{
cout <<"**ATM**" endl;
while(quit!) {
cout << "Choose a transaction: \n";
cout << 1. "Withdraw Funds \n";
<< 2. "Deposit Funds \n";
<< 3. "Quit \n;"
<< "\n";
<< "Enter option: ";
cin >> option;
switch (option)
{
case 1:
cout << "Enter the amount you would like to withdraw: "
endl;
cin >> withdraw;
balance = balance - withdraw;
cout << "You withdrew $ " << withdraw<< endl;
cout << "Your remaining balance is $ " << balance <<endl;
if
{ (withdraw < $500.00)
{withdraw (amountRequested) ;
}
else
{ withdraw (0);
notifyCustomer("The amount you entered has exceeded your"
"daily withdrawl allowance. Please redo." );
}
case 2:
cout << "Enter the amount you would like to deposit: "
endl;
cin >> deposit;
balance = balance + deposit;
cout << "You deposited $ " << deposit << endl;
cout << "Your new balance is $ " << balance << endl;
case 3:
quit = true;
break;
}
}
return 0;
}