Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Bubble(int[] tab, int n)
- {
- for (int i = 1; i < n; i++)
- {
- for (int j = n-1; j >= 1; j--)
- {
- if (tab[j] < tab[j - 1])
- {
- int temp;
- temp = tab[j - 1];
- tab[j - 1] = tab[j];
- tab[j] = temp;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment