Computer Science Canada

help with listing names under Alphabetical order

Author:  kho [ Sun Nov 23, 2003 3:42 pm ]
Post subject:  help with listing names under Alphabetical order

code:
var name: string
var count : int := 0
put "-- Enter a series of names --"
loop
put "Name ",count + 1, ": "..
get name
    count := count + 1
if name = "*" then
exit
end if
end loop
put name

THeres the code. I've tried for hours, how do I put it in Alpha :(

Author:  Andy [ Sun Nov 23, 2003 3:46 pm ]
Post subject: 

read my tutorials on arrays and sortting and for your program, i suggest using a flexible array, also in my tutorial

Author:  kho [ Sun Nov 23, 2003 3:51 pm ]
Post subject: 

I wasn't tought arrays yet, can u show me another way

Author:  Andy [ Sun Nov 23, 2003 4:04 pm ]
Post subject: 

do you noe how many names there are gonna be?

Author:  kho [ Sun Nov 23, 2003 4:07 pm ]
Post subject: 

In the question it says series, so I guess unlimited lol

Author:  Tony [ Sun Nov 23, 2003 6:16 pm ]
Post subject: 

well then you need to create an unlimited number of variables Laughing
code:

var name1:string
var name2:string
...
var nameInfinity:string


good luck Laughing Just read a tutorial on arrays. I've wrote one and dodge is saying he wrote another one...

Author:  Andy [ Sun Nov 23, 2003 6:48 pm ]
Post subject: 

mine is better than urs tony :p


: