I have a function that compares 2 arrays with 6 numbers in each and outputs the matching numbers. I have written a function that does this but I need to output the numbers in ascending order and I can't figure out how.
This is the function...
Expand|Select|Wrap|Line Numbers
- void numbers (int draw[], int entry[])
- {
- for(int i=0; i<MAXSIZE; i++)
- {
- for(int j=0; j<MAXSIZE; j++)
- {
- if(draw[i]==entry[j])
- cout << draw[i] << " ";
- }
- }
- cout << endl;
- }
Thanks