Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (define (piezas_t hInicial hFinal)
- (cond
- [(and (>= hInicial 0)(<= hFinal 24))(- 498 (+ (piezas_h hInicial) (- 498 (piezas_h hFinal))))]
- [else (error "Ingrese un rango de horario válido")]
- )
- )
- (define (piezas_h hora)
- (cond
- [(and (>= hora 0)(<= hora 10)) (* (- hora 0) 25)]
- [(and (>= hora 10)(<= hora 16)) (+ (* (- hora 10) 28) 250)]
- [(and (>= hora 16)(<= hora 24)) (+ (* (- hora 16) 10) 418)]
- [else (error "Ingrese un horario válido")]
- )
- )
- (piezas_t 5 17)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement