matheus__serpa

Untitled

Jun 18th, 2019
196
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.18 KB | None | 0 0
  1. void ordena(int *A, int N){
  2.     int i, j, x;
  3.     for(i = 1; i < N; i++){
  4.         x= A[i];
  5.         j = i - 1;
  6.         while(j >= 0 && A[j] > x){
  7.             A[j + 1] = A[j];
  8.             j--;
  9.         }
  10.         A[j + 1] = x;
  11.     }
  12. }
Add Comment
Please, Sign In to add comment