#include "stdafx.h" #include #include #include using namespace std; //const int n = 7; //int a[n] = { 20, 7, 15, 1, 3, 10, 12 }; const int n = 1000000; int a[n]; void swap (int i, int k) { int c; c = a[i]; a[i] = a[k]; a[k] = c; } void quickSort (int r, int s) { int i=r; int k=s; int h=a[(i+k)/2]; while (i <= k) { while (h > a[i]) i++; while (h < a[k]) k--; if (i <= k) { swap (i, k); i++; k--; } } if(r 0) if (a[i - 1] > a[i]) cout << " Chyba"; //cout << endl; } cout << "Konec programu" << endl; system ("pause"); return 0; }