Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void recursive_bubble(produto *v, int n)
- {
- int swap = 0;
- int i;
- produto *tmp;
- for(i=0;(i+1)<n;++i)
- {
- if(((v+i)->cod) < ((v+(i+1))->cod))
- {
- tmp = (v+i);
- v[i] = v[i+1];
- v[i+1] =tmp;
- swap = 1;
- }
- }
- if(swap)
- recursive_bubble(v, n);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement