1
I’m doing a function in Lisp that receives 3 numbers and says if the first is equal to the sum of the other two, the code I arrived was this:
(defun maior(n1 n2 n3)
(if (=(+ n2 n3)n1)
(format t "~D é maior que ~D e ~D!" n1 n2 n3)
)
However, it is not running I believe the problem is in the syntax, I want to show that the sum of n2 and n3 is equal to n1.
In the title of the question, you say you have doubt. What is? Edith your question and show what you have already done and in which part is the doubt.
– emanuelsn
I changed the question friend.. and I put the code that is giving error in my doubt.
– Danilo Baptista
It was mto simple, I had forgotten to close the if . -. Thanks for your attention buddy, I’m new here at the forum, I’ll try to ask more elaborate questions next, hugs.
– Danilo Baptista