Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void sort(int array[], bool ascending)
- {
- int temp;
- if (ascending)
- {
- for (int i = 2; i < array[1] + 2; i++)
- {
- for (int j = i + 1; j < array[1] + 2; j++)
- {
- if (array[j] < array[i])
- {
- temp = array[i];
- array[i] = array[j];
- array[j] = temp;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement