
-----------------------------------
customae7
Sun Apr 29, 2007 7:27 pm

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.

-----------------------------------
Andy
Sun Apr 29, 2007 8:14 pm

RE:Recursion alphabetical
-----------------------------------
no we will not do your homework for you.

-----------------------------------
Cervantes
Sun Apr 29, 2007 11:20 pm

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 
5 < 7
is valid (and returns true),
"bar" < "foo"
is also valid (and returns true, because "bar" is alphabetically less than "foo").

With that, do you still have a question? :)

-----------------------------------
customae7
Mon Apr 30, 2007 7:59 am

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.

-----------------------------------
Drakain Zeil
Mon Apr 30, 2007 3:32 pm

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
