Good evening. I am doing a college job about an ATM and I have a small question. I am creating a do
to make the replay menu of the ATM, but before the user enters the box, it will set a value for the accounts, because the balance variable is set to 0. After this, it will be released to the menu. But after setting the value, it keeps repeating the "teste"
message. I would like some help.
Here is the code:
do{
if(saldoCC<=0 && saldoCP<=0) {
System.out.println("-----------------------------------------------------------");
System.out.println("Saldo zerado em ambas as contas!");
System.out.println("Para utilizar o caixa eletrônico sete o valor!");
System.out.println("-----------------------------------------------------------");
System.out.println("DIGITE O VALOR PARA REPOR O SALDO");
System.out.println("-----------------------------------------------------------");
System.out.print("Saldo da CONTA CORRENTE: R$");
saldoCC = teclado.nextFloat();
System.out.print("Saldo da CONTA POUPANÇA: R$");
saldoCP = teclado.nextFloat();
System.out.println("-----------------------------------------------------------");
System.out.println("SALDO SETADO!");
System.out.println("Conta Corrente: R$"+ saldoCC);
System.out.println("Conta Poupança: R$"+ saldoCP);
}else{
System.out.println("teste");
}
}while(op != 3);