Time format

Report a typo

You are given a number representing the number of seconds passed since 1.1.1970.
Write a program that calculates the current time using the / and % operators, and print it out with the given format: "hours:minutes:seconds"

Example: "14:9:7"

Write a program in Kotlin
fun main() {
val totalSeconds = System.currentTimeMillis() / 1000 // do not change this line
// enter your code
}
___

Create a free account to access the full topic