Beginner with C: While Loop Question

Hi all,

I had recently been given an assignment, in which I was asked to write a C program that1. prompts the user to enter two character values;2. prints out the sequence of characters between the two values (inclusive). I solved this with the following code:

Now I have been asked to add a feature in which the two characters are entered is not significant. Therefore,regardless of whether the higher or lower character is the first entered the sequence isstill displayed in ascending order from the lowest to the highest.

Think about your loop condition. You use something to compare two characters. So, maybe compare and find the greater of the two. If A > B, swap them and print.

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook, The Wizardry Compiled

"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook, The Wizardry Compiled