Hey i have a program that i need to write where a user has to enter 3 names and then my program has to spit them back in alphabetical order. i know how to display the answers i just dont know how to code it to get the answer :/ EX. if i entered Charlie, Leslie, and Andy, the program needs to display:

"Andy"
"Charlie"
"Leslie"

I dont know how to get the program to order them that way. I know that i have to use temps, but im not sure how to implement them correctly.
If anyone could give me a little insight, it would be greatly appreciated.
Thanks

If you had three pieces of paper with the names written on them and four slots on the table where you could lay the pieces of paper, 3 holding the papers with the names and one empty,
How would you move the pieces of paper one at a time from its current location to an empty slot and end with the names in order? The empty slot is the temp slot and will be empty at the end of the movements.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.