Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (divides? a b)
- (= (remainder a b) 0))
- (define (leap-year? c)
- (cond ((divides? c 100) #f)
- ((divides? c 400) #t)
- ((divides? c 4) #t)
- (else #f)
- )
- )
- (define (leap-year-logical? c)
- (and (or (divides? c 4) (divides? c 400)) (not (divides? c 100)))
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement