Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Recursion alphabetical
Index -> Programming, Turing -> Turing Submissions
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
customae7




PostPosted: 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.


Array REcursion.t
 Description:
This is the file just open in turing

Download
 Filename:  Array REcursion.t
 Filesize:  849 Bytes
 Downloaded:  90 Time(s)

Sponsor
Sponsor
Sponsor
sponsor
Andy




PostPosted: Sun Apr 29, 2007 8:14 pm   Post subject: RE:Recursion alphabetical

no we will not do your homework for you.
Cervantes




PostPosted: 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
code:
5 < 7

is valid (and returns true),
code:
"bar" < "foo"

is also valid (and returns true, because "bar" is alphabetically less than "foo").

With that, do you still have a question? Smile
customae7




PostPosted: 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.


Alphabetical.t
 Description:

Download
 Filename:  Alphabetical.t
 Filesize:  1 KB
 Downloaded:  104 Time(s)

Drakain Zeil




PostPosted: 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
Display posts from previous:   
   Index -> Programming, Turing -> Turing Submissions
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 5 Posts ]
Jump to:   


Style:  
Search: