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 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,3f1374bc66d2dc03 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g43g2000cwa.googlegroups.com!not-for-mail From: "jimmaureenrogers@worldnet.att.net" Newsgroups: comp.lang.ada Subject: Re: creating an array Date: 14 Feb 2006 14:17:35 -0800 Organization: http://groups.google.com Message-ID: <1139955455.397334.310790@g43g2000cwa.googlegroups.com> References: <1139897171.996297.230070@z14g2000cwz.googlegroups.com> <1139951664.264622.240870@z14g2000cwz.googlegroups.com> NNTP-Posting-Host: 209.194.156.4 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1139955463 1972 127.0.0.1 (14 Feb 2006 22:17:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 14 Feb 2006 22:17:43 +0000 (UTC) User-Agent: G2/0.2 X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0),gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: g43g2000cwa.googlegroups.com; posting-host=209.194.156.4; posting-account=SqOfxAwAAAAkL81YAPGH1JdBwpUXw9ZG Xref: g2news1.google.com comp.lang.ada:2894 Date: 2006-02-14T14:17:35-08:00 List-Id: isaac2004 wrote: > ok to everybody trying to help me thank you i didnt specify enough. i > have a program that takes two inputs from prompts, the first number is > an integer less than 10. the second number has the amount of digits > that the previous number specifies. what i want to do is split the > number up into single digits, sort them and out put the min ascending > order. > You might think through your requirements one more time. What happens when the first parameter does not match the number of digits in the second parameter? If this condition is never supposed to occur then why enter the first parameter? Simply calculate the number of digits from the number entered and sort its digits. Your split subprogram is a lot of work. You can achieve the same results by converting the number to a string, which is an array of characters. Sort that array and output the results. The 'Image attribute will convert the number to its corresponding string representation. Jim Rogers