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 400) #t)
- ((divides? c 100) #f)
- ((divides? c 4) #t)
- (else #f)
- )
- )
- (define (leap-year-logical? c)
- (or (and (divides? c 4) (not (divides? c 100))(divides? c 400)))
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement