ayuda
me podrian a ayudar a terminar este programa
me piden q vuelva a preguntar si deseo ingresar otra hora (si o no)
y la verdad no se como
package time1test;
import java.util.Scanner;
public class Time1test {
public static void main(String[] args) {
boolean ciclo=true;
Time1 time= new Time1();
Scanner scan = new Scanner (System.in);
int h,s,m;
do{
ciclo=false;
System.out.print("EL TIEMPO UNIVERSAL ES:");
System.out.println(time.touniversalString());
System.out.print("EL TIEMPO INICIAL ESTANDAR ES ");
System.out.println(time.toString());
System.out.println("INTRODUSCA LA HORA:");
h=scan.nextInt();
s=scan.nextInt();
m=scan.nextInt();
time.settime(h, m, s);
System.out.print("Universal time after settime is:");
System.out.println(time.touniversalString());
System.out.print("Standard time after settime is");
System.out.println(time.toString());
System.out.println("do you like enter other time");
System.out.println("Enter true if you answer is yes");
ciclo=scan.hasNextBoolean();
}while(ciclo!=false);
}}
- Inicie sesión o regístrese para enviar comentarios
Hola amigo, que tal? Bueno no
Hola amigo, que tal?
Bueno no soy experto en Java pero creo que podría ayudarte.
En el Do While el Do siempre se reproduce, y es ahí donde pondrás preguntar si se desea ingresar otra fecha.
prueba el código y me dices que tal te anda