Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; Alejandro Roldan
- ; fecha: 10 septiembre del 2018
- ; contrato edad : numero numero --> simbolo
- ; proposito: este programa recibe un numero, le compara con otro y retorna su diferencia
- ;ejemplo ( chequear-diferencia 2 3 --> 'pequeño)
- ;;definicion
- (define (chequear-diferencia a b)
- (cond
- [(= a b) 'iqual ]
- [(and (< 0 (abs (- a b))) (>= 10 (abs (- a b)))
- ) 'small ]
- [else 'grande]
- )
- )
- ;;pruebas
- (check-expect (chequear-diferencia 1 2) 'small )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement