import java.util.*; public class Demo { public static void main(String[] args) { Scanner s = new Scanner(System.in); System.out.print("Enter Input seconds: "); int seconds = s.nextInt(); int S = seconds % 60; int H = seconds / 60; int M = H % 60; H = H / 60; System.out.println(H + ":" + M + ":" + S); } }