Advertisement
egpotter

Untitled

Feb 19th, 2020
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.41 KB | None | 0 0
  1.     void f(long list[], long n)
  2.     {
  3.         long c, d, t;
  4.      
  5.         for (c = 0; c < n - 1; c++)
  6.         {
  7.             for (d = 0; d < n - c - 1; d++)
  8.             {
  9.                 if (list[d] > list[d + 1])
  10.                 {
  11.                     t           = list[d];
  12.                     list[d]     = list[d + 1];
  13.                     list[d + 1] = t;
  14.                 }
  15.             }
  16.         }
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement