Advertisement
Guest User

Untitled

a guest
May 16th, 2018
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.52 KB | None | 0 0
  1. (if (and (= 1 1) (= 2 2))
  2.     (format t "son iguales Todos ~%")
  3.     (format t "Algo no es igual ~%")
  4. )
  5.  
  6. (if (or (= 1 1) (nil))
  7.     (format t "Algo es Igual ~%")
  8.     (format t "Nada es Igual ~%")
  9. )
  10.  
  11. (if nil
  12.     (format t "ES VERDADERO ~%")
  13.     (format t "ES FALSO ~%")
  14. )
  15.  
  16. (defvar *num-1* 1)
  17. (defvar *num-2* 2)
  18. (defvar *num-3* 3)
  19.  
  20. (if (= *num-1* 1)
  21.     (progn
  22.         (setf *num-2* (* *num-2* 2))
  23.         (setf *num-3* (* *num-3* 3))
  24.     )
  25.     (format t "No es igual a 1~%"))
  26.    
  27. (format t "*num-2* = ~d ~%" *num-2*)
  28. (format t "*num-3* = ~d ~%" *num-3*)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement