Advertisement
12358_santi

Untitled

Dec 7th, 2020
2,170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Racket 0.47 KB | None | 0 0
  1. ;; autor: Santiago
  2. ;; fecha de creacion: 07/12/2020
  3. ;; contrato: area: numero, numero -> numero
  4. ;; proposito: hallar el area del circulo
  5. ;; ejemplo ((operacion numeropi 4)(* numeropi (sqr 4)))retorna  50.2656)((operacion numeropi 5)(* numeropi (sqr 5)))retorna  78.54)
  6. ;; definicion:
  7. (define numeropi 3.1416)
  8. (define (operacion numeropi r)
  9.   (* numeropi (sqr r)))
  10. ;;pruebas:
  11. (check-expect (operacion numeropi 5) 78.54)
  12. (check-expect (operacion numeropi 4) 50.2656)
  13.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement