Seconds since start of a day

Report a typo

Write a program that reads a number of seconds from the start of a day and prints the current time.

If the resulting time has zero seconds, do not output them.

Sample Input 1:

12345

Sample Output 1:

03:25:45

Sample Input 2:

60000

Sample Output 2:

16:40

Sample Input 3:

3600

Sample Output 3:

01:00
Write a program in Java 17
class Main {
public static void main(String[] args) {
// put your code here
}
}
___

Create a free account to access the full topic