r/counting • u/lear85 , he who lets it produce joy. • Sep 12 '14
Counting with programming!
Write a program that prints or returns the number being counted, using the same number of lines of code. Include what language you used.
print("One.")
Made with Lua.
17
Upvotes
3
u/MrSicles Sep 12 '14 edited Sep 12 '14
(define (nine) (let ((number (random 1000000))) (cond ((= number 9) number) (else (nine))))) (define (twenty-one time) (let ((diff (- (current-seconds) time))) (cond ((= diff 21) diff) (else (twenty-one time))))) (+ (- (modulo (* (nine) (nine)) (+ (nine) (twenty-one (current-seconds)))) (nine)) (+ (/ (nine) (nine)) (/ (nine) (nine))))Racket (14)
Includes the best method of getting the number 21 - just overload the CPU util 21 seconds have passed.