Need a unique gift idea?
A Pastebin account makes a great Christmas gift
SHARE
TWEET

Untitled

a guest Apr 16th, 2018 49 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. void arrSelectSort(float *arr, int size)
  2. {
  3.    int startScan, minIndex;
  4.    float minElem;
  5.  
  6.    for (startScan = 0; startScan < (size - 1); startScan++)
  7.    {
  8.       minIndex = startScan;
  9.       minElem = *(arr + startScan);
  10.       for(int index = startScan + 1; index < size; index++)
  11.       {
  12.          if (*(arr + index) < minElem)
  13.          {
  14.             minElem = *(arr + index);
  15.             minIndex = index;
  16.          }
  17.       }
  18.       *(arr + minIndex) = *(arr + startScan);
  19.       *(arr +startScan) = minElem;
  20.    }
  21. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top