Advertisement
Cardona1204

Untitled

Aug 10th, 2020
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.32 KB | None | 0 0
  1. ;datos
  2. ;hora inicial
  3. ;hora final
  4.  
  5. (define(contrato hi hf)
  6.   (cond
  7.     [(and(>= hi 0)(<= hf 10))(* 25 (- hf hi))]
  8.     [(and(> hi 10)(<= hf 16))(+(* 25 (- hf hi))(* 28 (- hf hi)))]
  9.     [(and(> hi 16)(<= hf 10))(+(* 25 (- hf hi))(* 28 (- hf hi))(* 10 (- hf hi)))]
  10.     [else(error "Hola")]
  11.  
  12.  
  13.     ))
  14.  
  15. (contrato 0 19)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement