Untitled
unknown
plain_text
2 years ago
257 B
15
Indexable
void sort(int n, int *a) { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (a[i] > a[j]) { //swap int t = a[i]; a[i] = a[j]; a[j] = t; } } } }
Editor is loading...
void sort(int n, int *a) { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { if (a[i] > a[j]) { //swap int t = a[i]; a[i] = a[j]; a[j] = t; } } } }