PROGRAM cliff
  IMPLICIT NONE
  DOUBLE PRECISION :: x0,x
  INTEGER :: k
  
  DO
     PRINT *, "Dose pragmatiko sto (0,1)"
     
     READ *, x0
     IF (x0 > 0.0d0 .AND. x0 < 1d0) EXIT
  END DO

  OPEN(17, file="random.txt", status="replace", action="write")
  
  DO k = 1,100
     x = 100 * LOG(x0)
     x = ABS(x - INT(x))

     WRITE (17,*) x

     x0 = x
  END DO

  CLOSE (17)
END PROGRAM cliff
