UNA HERMOSA MOTO

UNA HERMOSA MOTO

miércoles, 22 de abril de 2015

Problema Propuesto 07


07.-HORA EN MINUTOS Y SEGUNDOS.
Resultado de imagen para HORA EN MINUTOS Y SEGUNDOS


/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package problema17;
import java.io.*;
/**
 *
 * @author abel montalvan
 */
public class Problema17 {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) throws IOException {
   final int SEGUNDOS=3600;
         final int MINUTOS=60;
         
         int h,m,s;
     
BufferedReader in =new BufferedReader(new  InputStreamReader(System.in));
 System.out.println("Tiempo en horas: ");
    h=Integer.parseInt(in.readLine());
        
    m=h*MINUTOS;
    s=h*SEGUNDOS;
           
 System.out.println("");
 System.out.println("MINUTOS: "+m);
 System.out.println("SEGUNDOS: "+s);


    }
}

No hay comentarios:

Publicar un comentario