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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,4e15d6a8412e87e7,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g44g2000cwa.googlegroups.com!not-for-mail From: "isaac2004" Newsgroups: comp.lang.ada Subject: program that finds amicable pairs and sociable numbers Date: 13 Feb 2006 10:54:10 -0800 Organization: http://groups.google.com Message-ID: <1139856850.883467.266980@g44g2000cwa.googlegroups.com> NNTP-Posting-Host: 140.160.138.134 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1139856856 30988 127.0.0.1 (13 Feb 2006 18:54:16 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 13 Feb 2006 18:54:16 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; InfoPath.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g44g2000cwa.googlegroups.com; posting-host=140.160.138.134; posting-account=bWy1LAwAAAAtVkasDCH0ykMCBMNd-FcL Xref: g2news1.google.com comp.lang.ada:2878 Date: 2006-02-13T10:54:10-08:00 List-Id: hello i am new to ADA and being a math guy am trying to create a program that takes 3 inputs from a user, them being a starting integer, a stopping integer, and an indicated length. the goal of the program is to determine the sociable pair in the range with the required length. For example. user inputs following Start = 12000, Stop = 15000 and Length = 30 program would output This chain is 3 in length. 12285 14595 12285 This chain is 6 in length. 12496 14288 15472 14536 14264 12496 This chain is 6 in length. 14264 12496 14288 15472 14536 14264 This chain is 6 in length. 14288 15472 14536 14264 12496 14288 This chain is 29 in length. 14316 19116 31704 47616 83328 177792 295488 629072 589786 294896 358336 418904 366556 274924 275444 243760 376736 381028 285778 152990 122410 97946 48976 45946 22976 22744 19916 17716 14316 This chain is 6 in length. 14536 14264 12496 14288 15472 14536 This chain is 3 in length. 14595 12285 14595 notice that the final number in the chain is always equal to the starting number. this is called a sociable chain. can anybody help me in creating a program that would do this. thank you