From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b50bc6538a649497 X-Google-Attributes: gid103376,public From: John English Subject: Re: if statements Date: 2000/11/07 Message-ID: <3A081648.8E6FF536@bton.ac.uk>#1/1 X-Deja-AN: 690823063 Content-Transfer-Encoding: 7bit References: X-Accept-Language: en Content-Type: text/plain; charset=us-ascii X-Complaints-To: news@bton.ac.uk X-Trace: saturn.bton.ac.uk 973608543 5606 193.62.183.204 (7 Nov 2000 14:49:03 GMT) Organization: University of Brighton Mime-Version: 1.0 NNTP-Posting-Date: 7 Nov 2000 14:49:03 GMT Newsgroups: comp.lang.ada Date: 2000-11-07T14:49:03+00:00 List-Id: tmoran@acm.org wrote: > > > > can anyone show me an if statement that will swap the values of A and B, > > > if A is the greater value > > > > Probably not without violating our policy of not doing people's homework. > Are there really programming classes that, in early November, have > only just started discussing "if" statements!? The original post was presumably in response to this: "Exercise 4.1: Write an if statement which will swap the values of variables A and B if necessary so that the smaller value ends up in A and the larger value ends up in B." The closing date for this was the 3rd of November; the question had been made available at least 2 weeks earlier. A similar question was also set 2 weeks prior to that: "Exercise 2.6: Write a set of assignment statements which will swap the values of two variables called A and B." Presumably he didn't manage to solve that, or hadn't noticed the similarity... :-) ----------------------------------------------------------------- John English | mailto:je@brighton.ac.uk Senior Lecturer | http://www.it.bton.ac.uk/staff/je Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS ** University of Brighton | -- see http://burks.bton.ac.uk -----------------------------------------------------------------