so my project is due tomarrow and im stuck i need to some help. This is what i have it came up with some errors and i need to finish it. The conditions are TOTAL BALANCE and need to withdraw only multipule of 20
// This is a program that is an ATM.
#include <iostream>
#include <cstdlib>
#include <iomanip>
using namespace std;
// These are function prototypes
void welcome();
void menu();
double amountDeposit ();
void amountWithdrawal();
double finalBalance ();
void exit();
// This the main function that will operate all other funtions.
int main ()
{
char choice;
double deposit,totalBalance;
welcome();
do
{
menu();
cin >> choice;
while (choice < 'A' || choice > 'C')
{
cout << " Please make a choice in the range";
cout << " of A through C:";
cin >> choice;
}
switch (choice)
{
case 'a' :
case 'A' : exit();
break;
case 'b' :
case 'B' : amountDeposit();
cout << "You deposited $ " << amountDeposit() << "." << finalBalance () << "." << endl;
break;
case 'c' :
case 'C' : amountWithdrawal();
break;
}
} while ( choice != 'A');
return 0;
}
// Function is the welcome menu.
void welcome()
{
cout << "- - - - - - - - - - - - - - - - - - -" << endl;
cout << "- Welcome to DDJ'S ATM Servies -" << endl;
cout << "- Please follow the instructions -" << endl;
cout << "- to access you account -" << endl;
cout << "- - - - - - - - - - - - - - - - - - -" << endl;
system ("PAUSE");
system ("cls");
}
// Function is the welcome Main menu that gives you the choices.
void menu()
{
cout << "What would you like to do?" << endl;
cout << "A. Exit the program" << endl;
cout << "B. Make a deposit" << endl;
cout << "C. Make a withdrawal" << endl;
}
// Function will run the deposits.
double amountDeposit(double deposit)
{
cout << "How much would you like to deposit? $";
cin >> deposit;
if ( deposit >=1000)
{
cout << "Only able Deposit Maximum of $1000.00 Try Again" << endl;
cin >> deposit;
}
return (deposit);
system ("PAUSE");
system ("cls");
}
// Function will run the withdrawals.
void amountWithdrawal()
{
double withdrawal;
cout << "How much would you like to withdrawal? $";
cin >> withdrawal;
if ( withdrawal >=500)
{
cout << "Only able withdrawal Maximum of $500.00. Try Again" << endl;
cin >> withdrawal;
}
if ( withdrawal= withdrawal % 20)
{
cout << "Withdrawal Must be a multiple of $20. Try Again" << endl;
cin >> withdrawal;
}
system ("PAUSE");
system ("cls");
}
double finalBalance (double totalBalance)
{
double balance = 800,
totalbalance;
totalBalance = balance + amountDeposit();
return (totalbalance);
}
// This is the exit funtion
void exit ()
{
cout << "Please come again.\n";
}