import javax.swing.JOptionPane;
class tugasDetikwhile{
public static void main (String Args[]){
String ANGKA,USER;
int angka,user,A,C,B,D;
do {
do{
ANGKA = JOptionPane.showInputDialog("MASUKAN SEBUAH ANGKA[0-1000000] : ");
angka = Integer.parseInt(ANGKA);
if(angka<0||angka>1000000){
JOptionPane.showMessageDialog(null,"angka harus [0-1000000]","WARNING",JOptionPane.PLAIN_MESSAGE);
}
}while(angka<0||angka>1000000);
A = (int) angka/3600;
B = angka%3600;
C = (int) B/60;
D = B%60;
JOptionPane.showMessageDialog(null, A+ "Jam\t" + C + "menit\t" +D+ "detik\n","niw_re",JOptionPane.PLAIN_MESSAGE);
USER = JOptionPane.showInputDialog("APA ANDA INGIN MENGULANG[jawab ya=1 tidak=0 : ");
user = Integer.parseInt(USER);
}while(user==1);
JOptionPane.showMessageDialog(null,"\nPROGRAM SELESAI TERIMA KASIH TELAH MENCOBA","aniw_re",JOptionPane.PLAIN_MESSAGE);
}
}
PROGRAM JAVA KONVERSI JAM MENIT DETIK
Langganan:
Posting Komentar (Atom)
0 comments:
:)) :)] ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} ~x( :-t b-( :-L x( =)) :f :D :) ;;) :x :$ x( :?
:@ :~ :| :)) :( :s :(( :o
Posting Komentar