Computer Science, asked by mynameisarnab2008, 1 day ago

write a program in java to input the time in minutes and convert and display into hours and minutes and minutes and total seconds along with varible in it?

Answers

Answered by kavishsaisomu
0

Answer:idk

Explanation:

Answered by harshmaury75
0

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");

}

}

Similar questions