How would I put a string in alphabetical order
thaks moe
Printable View
How would I put a string in alphabetical order
thaks moe
How would you personally put a list of numbers in order? That ought to give you an idea.
You could use ascii values for the characters to order them, but first you must switch all the characters to the same case.
bubble sort?
EDIT: wait...no *slaps himself in forehead*Code:for(a=1; a<size; a++)
{
for(b=size-1; b>=a; b--)
{
t = string[b-1];
string[b-1] = string[b];
string[b] = t;
}
}