My Computer Programs

(newLISP) 로또 번호 생성

steloflute 2013. 7. 26. 23:30

In newLISP

 

(slice (randomize (sequence 1 45)) 0 6)

 


; 로또 1등이 얼마나 되기 어려운지 실험
(define (lotto) (slice (randomize (sequence 1 45)) 0 6))
(let (i 0) (while (!= n '(1 2 3 4 5 6)) (++ i) (setq n (lotto)) (println i " " n)))

 

'My Computer Programs' 카테고리의 다른 글

(Racket) SweepSecond  (0) 2013.08.22
webcheck  (0) 2013.08.08
(newlisp) port scan  (0) 2013.07.22
(Paren) 로또 번호 생성  (0) 2013.07.09
(Clojure) 로또 번호 생성  (0) 2013.06.19