Bubble sort in c programming arranges in ascending or descending order?

Assume you have two values, q and r, defined this way: int q, r ... and that q is the first number entered and r is the second. Then you want to display all the even numbers and odd numbers in either ascending or descending order, where the order of display is probably controlled by answering the question, (q < r)? First, you need to answer the unusual case of what to do if (q == r).

You haven't said, but I believe there would be exactly one number listed in either the even or odd list (depending on whether or not q was even or odd, of course) and the other list would be empty. But the basic idea would start out like: if ( q r ) { output odd and even lists in descending order } else { output odd and even lists, with a number in one and nothing in the other } You will need to insert some kind of for() loop for stepping through the values to be printed. If you want to output all the even first and then the odd numbers, you will need to write two such for() loops.

One way to test for even or odd is to use this expression.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions