Path: ...!3.eu.feeder.erje.net!2.eu.feeder.erje.net!feeder.erje.net!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: "B. Pym" Newsgroups: comp.lang.lisp Subject: Re: Sum of squares Date: Mon, 26 Aug 2024 00:29:06 -0000 (UTC) Organization: A noiseless patient Spider Lines: 7 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Injection-Date: Mon, 26 Aug 2024 02:29:06 +0200 (CEST) Injection-Info: dont-email.me; posting-host="d83e4a38965968cd3c6fd187ef0e0ba2"; logging-data="2273155"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19x2qwdVgrGeDY56pd/f3kJ" User-Agent: XanaNews/1.18.1.6 Cancel-Lock: sha1:5KwFWSd+miMPmx0aExiihaaqB2o= Bytes: 1121 > Define a procedure that takes three numbers as arguments and returns > the sum of the squares of the two larger numbers. (define (sos a b c) (cond ((> a b) (sos b a c)) ((> b c) (sos a c b)) (#t (+ (* b b) (* c c)))))