To convert a given number into corresponding hours, minutes, and seconds.


class  hour
{
public static void main(String args[])
{
int h,m,s,t,min;
t=7266;
h=t/3600;
System.out.println("hours"+h);
m=t%3600;
System.out.println("m"+m);
min=m/60;
System.out.println("min"+min);
}
}
in place of 7266 for t , use any number.
  • To convert a given number into corresponding hours, minutes, and seconds.
  • Shubam Bharti
  • Saturday 12 April 2014
  • No comments:
 

0 comments:

Post a Comment