0
Someone could help me, example at the end of the code has the option for the person to type YES or NO, as they would for if the person typed another word, appeared a message saying that is Yes or No and returned the option for the person to try again.
valorTotalDoDia = valorTotalDoDia + valorCompra;
System.out.println("♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎");
System.out.println("O total do pedido deu: R$ " + valorCompra);
System.out.println("♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎♦︎");
z.clear();
valorCompra = 0;
System.out.println("Deseja finalizar o dia de trabalho ? ");
fecharSistema = input.next("Sim para sair e Não para ficar");
if (("Sim".equals(fecharSistema)) || ("sim".equals(fecharSistema))) {
System.out.println("O valor total de vendas do dia é: R$ " + valorTotalDoDia);
dia = false;
} else {
}
}
}
}
Ever heard of looping? He is the answer to your question.
– user28595
AA Thanks, thank you very much !!
– Lucas