----YOU ADS---
import java.util.Scanner;
class konversi_waktu {
public static void main (String [] args) {
int detik;
Scanner scan = new Scanner(System.in);
System.out.println ();
System.out.print (" masukkan detik\t");
detik = scan.nextInt();
int tahun,bulan,minggu,hari,jam,menit,sisa,sisa1,sisa2,sisa3,sisa4,sisa5;
tahun = detik / 217728000;
sisa5 = detik - (tahun*217728000);
bulan = detik / 18144000;
sisa4 = detik - (bulan*18144000);
minggu = detik / 604800;
sisa3 = detik - (minggu*604800);
hari = detik / 86400;
sisa = detik - (hari*86400);
jam = sisa / 3600;
sisa1 = sisa - (jam*3600);
menit = sisa1 / 60;
sisa2 = sisa1 - (menit*60);
System.out.println(" tahun = " +tahun );
System.out.println(" bulan = " +bulan );
System.out.println(" minggu = " +minggu );
System.out.println(" hari = " +hari );
System.out.println(" jam = " +jam );
System.out.println(" menit = " +menit );
System.out.println(" Detik = " +sisa2 );
}
} ----YOU ADS---
----YOU ADS---
----YOU ADS---
import java.util.Scanner;
class konversi_waktu {
public static void main (String [] args) {
int detik;
Scanner scan = new Scanner(System.in);
System.out.println ();
System.out.print (" masukkan detik\t");
detik = scan.nextInt();
int tahun,bulan,minggu,hari,jam,menit,sisa,sisa1,sisa2,sisa3,sisa4,sisa5;
tahun = detik / 217728000;
sisa5 = detik - (tahun*217728000);
bulan = detik / 18144000;
sisa4 = detik - (bulan*18144000);
minggu = detik / 604800;
sisa3 = detik - (minggu*604800);
hari = detik / 86400;
sisa = detik - (hari*86400);
jam = sisa / 3600;
sisa1 = sisa - (jam*3600);
menit = sisa1 / 60;
sisa2 = sisa1 - (menit*60);
System.out.println(" tahun = " +tahun );
System.out.println(" bulan = " +bulan );
System.out.println(" minggu = " +minggu );
System.out.println(" hari = " +hari );
System.out.println(" jam = " +jam );
System.out.println(" menit = " +menit );
System.out.println(" Detik = " +sisa2 );
}
} ----YOU ADS---