Computer Science, asked by sharad5136, 10 months ago

write a program to accept time in second and display the time in hours minute and second without using scanner ​

Answers

Answered by duttadeeptangsh
0

Answer:

NO SCANNER CLASS USED

class time

{

void t_cal(int t)

{

int h=(int)(t/60);

int m=t%60;

if(m>=60)

{

h=h+1;

m=m-60;

}

System.out.println ("Time= "+h+":"+m+" hrs");

}

}

HOPE THIS WILL HELP YOU

Similar questions