Advertisement
pablosotol

Ejercicio 4 - Guía 1

Apr 13th, 2016
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.89 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Principal {
  4.     public static void main(String[] args){
  5.             Scanner ent=new Scanner(System.in);
  6.             System.out.println("Ingrese el anio: ");
  7.             int anio=ent.nextInt();
  8.             System.out.println("Ingrese el mes: ");
  9.             int mes=ent.nextInt();
  10.             System.out.println("Ingrese el dia: ");
  11.             int dia=ent.nextInt();
  12.             System.out.println("Ingrese la hora: ");
  13.             int hora=ent.nextInt();
  14.             System.out.println("Ingrese los minutos: ");
  15.             int minutos=ent.nextInt();
  16.             System.out.println("Ingrese los segundos: ");
  17.             int segundos=ent.nextInt();
  18.             FechaHora f=new FechaHora(anio,mes,dia,hora,minutos,segundos);
  19.             f.laHora();
  20.             f.laFecha();
  21.             f.comprobarFechaYHora();
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement