Skip to content

Instantly share code, notes, and snippets.

@KristupasSavickas
Last active January 12, 2016 16:53
Show Gist options
  • Save KristupasSavickas/e4cce3752d279dcae5f3 to your computer and use it in GitHub Desktop.
Save KristupasSavickas/e4cce3752d279dcae5f3 to your computer and use it in GitHub Desktop.
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