Recursion alphabetical
Author |
Message |
customae7
|
Posted: Sun Apr 29, 2007 7:27 pm Post subject: Recursion alphabetical |
|
|
Does anyone know how to make a program that you input names into and it will list them alphabetically using recursion. I have a program here that will generate numbers with recursion if this helps, and maybe you can modify it to do names in alphabetical order.
Description: |
This is the file just open in turing |
|
Download |
Filename: |
Array REcursion.t |
Filesize: |
849 Bytes |
Downloaded: |
90 Time(s) |
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
Andy
|
Posted: Sun Apr 29, 2007 8:14 pm Post subject: RE:Recursion alphabetical |
|
|
no we will not do your homework for you.
|
|
|
|
|
|
Cervantes
|
Posted: Sun Apr 29, 2007 11:20 pm Post subject: RE:Recursion alphabetical |
|
|
Err, Andy... =/
customae7, if you have code that can sort numbers, you can do virtually the same thing to sort alphabetically.
Just as
is valid (and returns true),
is also valid (and returns true, because "bar" is alphabetically less than "foo").
With that, do you still have a question?
|
|
|
|
|
|
customae7
|
Posted: Mon Apr 30, 2007 7:59 am Post subject: Re: Recursion alphabetical |
|
|
ya actually im making this for my own use andy and i have a code for names now i just need to sort it alphabetical. Here is my new program take a look.
Description: |
|
Download |
Filename: |
Alphabetical.t |
Filesize: |
1 KB |
Downloaded: |
104 Time(s) |
|
|
|
|
|
|
Drakain Zeil
|
Posted: Mon Apr 30, 2007 3:32 pm Post subject: RE:Recursion alphabetical |
|
|
Not entirely sure what that code is meant to do, it just looks like you initialize ... something?
You can sort names with the <, > operators.
Like Cervantes said, the same way you can test 100 < 100 ? true:false, abc is a number of a differnt data type. abc < abz ? true : false
|
|
|
|
|
|
|
|