SHARE
TWEET

sortare prin selectie

Robert_Manea Jan 15th, 2020 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. void sortare(int v[30],int n)
  2.  {int i,j,l,min;
  3.  for(i=0;i<n-1;i++){
  4.     l=i;
  5.     min=v[i];
  6.     for(j=i+1;j<n;j++)
  7.     if(v[j]<min){
  8.         min=v[j];
  9.         l=j;
  10.     }
  11.     v[l]=v[i];
  12.     v[i]=min;
  13.  }
  14.     for(i=0;i<n;i++)
  15.     printf("%d ",v[i]);}
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