Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Scanner;
- class Main {
- public static void main(String[] args)
- {
- while (true)
- {
- Scanner in = new Scanner(System.in);
- int timeSec = in.nextInt();
- int sec = timeSec % 60;
- int min = (timeSec / 60) % 60;
- int hour = (timeSec / 3600) % 24;
- int day = (timeSec / (3600*24)) % 60;
- System.out.printf("%02d:%02d:%02d:%02d \n", day, hour, min, sec);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement