Last active
January 12, 2016 16:53
-
-
Save KristupasSavickas/e4cce3752d279dcae5f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void rusiuoti(int mas[], int n) | |
{ | |
int laik; | |
for(int i = 0; i < n; i++) | |
{ | |
for(int j = 0; j < n - 1; j++) | |
{ | |
//Pakeisti > i < jei nori kad rusiuotu mazejimo tvarka | |
if(mas[j] > mas[j+1]) | |
{ | |
laik = mas[j]; | |
mas[j] = mas[j+1]; | |
mas[j+1] = laik; | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment