Advertisement
Alfoli

Inversão de Vetor

Oct 3rd, 2017
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.27 KB | None | 0 0
  1. void inverte (int vetorx[20]){
  2.      int i, aux;//aux guarda o vetor para que ele não seja subscrito no processo de inversão
  3.      for (i=0;i<10;i++){
  4.         aux = vetorb [19-i];
  5.         vetorx[19-i] = vetorx[i];
  6.         vetorx[i] = aux;
  7.      }//chave for
  8. }//chave void
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement