// Sort the elements with the lower and lower mark values of string a in ascending order. Other elements remain unchanged.
# Include "stdio. H"
# Include "conio. H"
# Include "string. H"
Void main ()
{
Char A [] = "clanguage", T;
Int I, J, K;
K = strlen ();
For (I = 0; I <= K-2; I + = 2) // each round is smaller than a [I] After
{
For (j = I + 2; j <= K; j + = 2)
{
If (A [I]> A [J]) // A [I] is larger than a [J], then the switching location
{
T = A [I];
A [I] = A [J];
A [J] = T;
}
}
}
Puts ();
Printf ("/N ");
Return;
}
// Read the sorting idea carefully!
// If you do not want to understand it, use a few strings of numbers on the manuscript and deduct them according to the procedure.
// You can also use the program debugging method to break a breakpoint at the beginning of the loop, F5 to start debugging, and F10 to track the exchange of related numbers
// Menu bar-> View (View)-> debug windows-> Watch window, you can enter the variable value you want to observe
// For more debugging methods, see Internet