Computer Science, asked by swastisharma027, 5 hours ago

WAP in java help meee​

Attachments:

Answers

Answered by roychhaya63
1

Explanation:

import java.util.Scanner;

public class KboatTime

{

public static void main(String args[]) {

Scanner in = new Scanner(System.in);

System.out.print("Time in seconds: ");

int inputTime = in.nextInt();

int hrs = inputTime / 3600;

int mins = (inputTime % 3600) / 60;

int secs = (inputTime % 3600) % 60;

System.out.println(hrs

+ " Hours "

+ mins

+ " Minutes "

+ secs

+ " Seconds");

}

}

Hope it helps

Similar questions