PROGRAM seconds

  IMPLICIT NONE

  INTEGER :: x                  
  INTEGER :: s, m, h, d

  INTEGER :: seconds_in_minute
  INTEGER :: minutes_in_hour
  INTEGER :: hours_in_day
  
  PRINT *, "Dwse ena xroniko diastima se defterolepta..."
  READ *, x
  
  seconds_in_minute = 60
  minutes_in_hour = 60
  hours_in_day = 24
  
  s = MOD(x, seconds_in_minute)
  x = x / seconds_in_minute

  m = MOD(x,minutes_in_hour)
  x = x / minutes_in_hour

  h = MOD(x,hours_in_day)
  x = x / hours_in_day

  d = x
  
  PRINT *, "To xroniko diastima antistoixei se..."
  PRINT *, d,"meres",h,"wres",m,"lepta",s,"defterolepta"

END PROGRAM seconds
