Combine loops, conditionals, and variables to build a working ATM that lets users check their balance, deposit money, and withdraw — safely.
YOUR TASK
Write a C program that:
Starts with a balance of 0
Shows a menu: Check Balance, Deposit, Withdraw, Exit
Loops until the user picks Exit (option 4)
Rejects withdrawals that exceed the current balance
Prints the updated balance after each operation
Need a hint?
Step-by-step:
1. Start: float balance = 0;
2. Use a while(1) loop to keep showing the menu
3. Read int choice; with scanf("%d", &choice);
4. Use if/else if (or switch) on the choice
5. For withdraw: if (amount > balance) printf("Insufficient funds\n");
6. For exit: use break; to leave the loop
7. Print balance with printf("Balance: %.2f\n", balance);