casper. Powered by Blogger.

Blog ini bertujuan untuk share ilmu dan pengetahuan. Semua source/aplikasi di blog ini bebas disebar dan mencamtumkan sumber "fandy-alfa.blogspot.com".

RSS

Program Konversi Waktu

import java.io.*;

public class konversi_waktu {
  
    public static void main (String [] args) throws IOException
    {
        BufferedReader stdin =
            new BufferedReader (new InputStreamReader(System.in));
       
        int hasil;   
       
        System.out.println("PROGRAM KONVERSI WAKTU");
        System.out.println("======================\n");
       
        System.out.print("Masukkan Jumlah Jam   : ");
        int jam = Integer.parseInt(stdin.readLine());
        System.out.print("Masukkan Jumlah Menit : ");
        int menit = Integer.parseInt(stdin.readLine());
       
        System.out.print("Masukkan Jumlah Detik : ");
        int detik = Integer.parseInt(stdin.readLine());
       
        hasil = (jam*3600)+(menit*60)+detik;
        System.out.println("Jadi Hasil Konversi : "+hasil);
        //System.in.read();
    }
}
  • Digg
  • Del.icio.us
  • StumbleUpon
  • Reddit
  • RSS

0 comments:

Post a Comment