TOPIC
Wrong answer (15%) Alguém me salva por favor!
meduarda108 asked 3 years ago
No meu netbeans o programa funciona da forma que o uri pede mas quando eu envio fica dando erro de 15% alguém me da uma luz fazendo favor hahaha
Scanner input = new Scanner(System.in); int horaInicial = input.nextInt(); int horaFinal = input.nextInt(); int total;
if (horaInicial > horaFinal) {
total = (24 - horaInicial) + horaFinal;
System.out.println("O JOGO DUROU " + total + " HORA(S)");
} else if (horaInicial < horaFinal) {
total = horaFinal - horaInicial;
System.out.println("O JOGO DUROU " + total + " HORA(S)");
} else if(horaInicial == 0 && horaFinal==0){
System.out.println("O JOGO DUROU 24 HORA(S)");
}
This topic was solved and cannot recieve new replies.