[LC++]Seperate an array into smallest to highest elements
ezratay1 at netzero.net
Tue Feb 19 13:04:02 UTC 2002
I want to display a[i] ....... a[middle] on one line then a[middle +1]
...... a[i-1] on the next.
In other words, a[i] to the middle of the array then the next element
from the middle to the last element displayed on a seperate line.
Mark Phillips wrote:
>Ezra Taylor wrote:
>> I'm new to C++, if this question is to infantile for
>>this list; lash me with kindness.
>>Now, I want to take an array with x elements and separate(print) them
>>into smallest to highest elements. The array is already sorted. Please
>>use novice C++ explanations.
>If I understand correctly what you want to do, it would be something
>int const x=100;
>for (int i=0; i<x; ++i)
> cout<<"myArray["<<i<<"] = "<<myArray[i]<<endl;
>Is that what you wanted to do?
>This is the Linux C++ Programming List
>: http://lists.linux.org.au/listinfo/tuxcpprogramming List
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the tuxCPProgramming