Advertisement
Guest User

Untitled

a guest
Dec 5th, 2019
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4.    int v[1000];
  5.  
  6. void ordonare(int v[1000], int n)
  7. {
  8.    int i, j, aux;
  9.    for(i=1;i<n;i++)
  10.       for(j=i+1;j<=n;j++)
  11.          if(v[i]>v[j]){
  12.             aux=v[i];
  13.             v[i]=v[j];
  14.             v[j]=aux;
  15.          }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement