Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #define N 40
- void sort(int Array[])
- {
- int max=N;
- int cur=0;
- int min,i,temp;
- while(cur<max) //cur: äußeres Konstrukt
- {
- min=cur; //min: inneres Konstrukt
- for(i=cur+1; i < max; i++)
- {
- if(Array[i] < Array[min])
- {
- min=i;
- }
- };
- temp = Array[min]; //vertausche die Array-Elemente
- Array[min]=Array[cur];
- Array[cur]=temp;
- cur=cur+1; //INC cur
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment