Advertisement
Daniel_Casallas

Untitled

Aug 10th, 2020
697
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Scheme 0.51 KB | None | 0 0
  1. (define (piezas_t hInicial hFinal)
  2.   (cond
  3.     [(and (>= hInicial 0)(<= hFinal 24))(- 498 (+ (piezas_h hInicial) (- 498 (piezas_h hFinal))))]
  4.     [else (error "Ingrese un rango de horario válido")]
  5.     )
  6.   )
  7.  
  8.  
  9. (define (piezas_h hora)
  10.   (cond
  11.     [(and (>= hora 0)(<= hora 10)) (* (- hora 0) 25)]
  12.     [(and (>= hora 10)(<= hora 16)) (+ (* (- hora 10) 28) 250)]
  13.     [(and (>= hora 16)(<= hora 24)) (+ (* (- hora 16) 10) 418)]
  14.     [else (error "Ingrese un horario válido")]
  15.     )
  16.  
  17.   )
  18.  
  19. (piezas_t 5 17)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement