Guest User

Untitled

a guest
Jun 24th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.20 KB | None | 0 0
  1. void bubble (int *a, int n) {
  2.  
  3. int i, j, TEMP;
  4.  
  5. for(j=0;j<n;j++) {
  6. for(i=0;i<(n-1);i++) {
  7. if (a[i]>a[i+1]) {
  8. TEMP = a[i];
  9. a[i] = a[i+1];
  10. a[i+1] = TEMP; } } }
  11.  
  12. }
Add Comment
Please, Sign In to add comment