/*****************************************************************
** Days - program to demonatrate the mod operator
**
** The output of this program is
**
**    1000000 seconds = 
**    11 days
**    13 hours
**    46 minutes, and
**    40 seconds
**
** (c) Scott MacKenzie, 2000                             
******************************************************************/
public class Days
{
   public static void main(String[] args)
   {
       int seconds =  1000000; //one million

       int days      = seconds / (24 * 60 * 60);
       int remainder = seconds % (24 * 60 * 60);
       int hours     = remainder / (60 * 60);
       remainder     = remainder % (60 * 60);
       int minutes   = remainder /  60;
       remainder     = remainder %  60;

       System.out.println(seconds   + " seconds = ");
       System.out.println(days      + " days");
       System.out.println(hours     + " hours");
       System.out.println(minutes   + " minutes, and");
       System.out.println(remainder + " seconds");
   }
}

