Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- static void Rikiuoti(ref Kolekcionierius K)
- {
- bool arBuvoKeitimu = true;
- Atvirukas temp; // temporary object
- while (arBuvoKeitimu)
- {
- arBuvoKeitimu = false;
- for (int i = 0; i <= K.kiek - 1)
- {
- if (K.Atvirukai[i].metai > K.Atvirukai[i-1].metai)
- {
- temp = K.Atvirukai[i];
- K.Atvirukai[i] = K.Atvirukai[i - 1];
- K.Atvirukai[i - 1] = temp;
- arBuvoKeitimu = true;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement