Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. (define (divides? a b)
  2. (= (remainder a b) 0))
  3.  
  4. (define (leap-year? c)
  5. (cond ((divides? c 400) #t)
  6. ((divides? c 100) #f)
  7. ((divides? c 4) #t)
  8. (else #f)
  9. )
  10. )
  11.  
  12. (define (leap-year-logical? c)
  13. (or (and (divides? c 4) (not (divides? c 100))(divides? c 400)))
  14. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement