Question: How do I fix this program to actually display what it needs to display. It's a C + + program and I don't know why
How do I fix this program to actually display what it needs to display. It's a C program and I don't know why it doesn't work.
#include
using namespace std;
declarations
void checkBalancefloat balance;
float depositMoneyfloat balance;
float withdrawMoneyfloat balance;
int main
float balance ;
int choice;
char anotherTransaction;
int accountBalances;
cout "Welcome to the Simple ATM System!
;
do
cout
ATM Menu
;
cout Check Balance
;
cout Deposit Money
;
cout Withdraw Money
;
cout Exit
;
cout "Enter your choice: ;
cin choice;
Process the user's input
switch choice
case :
checkBalancebalance;
break;
case :
balance depositMoneybalance;
break;
case :
balance withdrawMoneybalance;
break;
case :
cout "Thank you for using the ATM. Goodbye!
;
return ;
default:
cout "Invalid choice! Please select a valid option.
;
cout
Do you want to perform another transaction? yn: ;
cin anotherTransaction;
while anotherTransaction y anotherTransaction Y;
cout "Thank you for using the ATM. Goodbye!
;
return ;
check balance
void checkBalancefloat balance
cout "Your current balance is:
balance;
deposit money
float depositMoneyfloat balance
float amount;
cout "Enter the amount to deposit: ;
cin amount;
if amount
balance amount;
cout "Successfully deposited Your new balance is:
amount, balance;
else
cout "Invalid amount. Please try again.
;
return balance;
withdraw money
float withdrawMoneyfloat balance
float amount;
cout "Enter the amount to withdraw: ;
cin amount;
if amount && amount balance
balance amount;
cout "Successfully withdrew f Your new balance is:
amount, balance;
else if amount balance
cout "Insufficient balance.Your current balance is :
balance;
else
cout "Invalid amount. Please try again.
;
return balance;
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
