Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "Bubblesort.h"
- void bubblesort(vetor &a, tamanho n)
- {
- for(int j= n-1; j>0; j--){
- for(int i=0;i<j;i++){
- if(a[i+1] < a[i]){
- swap(a[i+1], a[i]);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement