kacxsku

Untitled

Jun 3rd, 2020
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. void bubble_sort(struct Student *list, int n)
  2. {
  3. int c, d;
  4. struct Student t;
  5.  
  6. for (c = 0; c < n - 1; c++) {
  7. for (d = 0; d < n - c - 1; d++) {
  8. if (list[d].stypendium > list[d + 1].stypendium) {
  9.  
  10. t = list[d];
  11. list[d] = list[d + 1];
  12. list[d + 1] = t;
  13. }
  14. }
  15. }
  16. }
Advertisement
Add Comment
Please, Sign In to add comment