For this one I have to do the while and do-while plus the for loop. I have this bank/atm style program so the goal is to put the teller into a loop so that the user can deposit, withdraw, check the balance as long as they need to, and entering 3 to exit when they are done. I'm stuck, the book I have is very hard to understand and any help would be appreciated. Here's what I have so far:
package Banker;
import java.util.Scanner;
public class Main {
int choice;
public static void main(String[] args) {
// Create a scanner
Scanner input = new Scanner(System.in);
// User prompted to enter a choice
System.out.print("Please choose one of the following");
System.out.println ("1: Deposit " +
"2. Withdrawl " +
"3. Check Balance " +
"4. Exit ");
int choice = input.nextInt();
}
}