Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void usuńNieparzyste(int licznik) {
- for (int a = 0; a < licznik; a++) {
- element l = head;
- element wcześniej = null;
- while (l != null && (l.value % 2) == 0) {
- wcześniej = l;
- l = l.next;
- }
- if (l != null) {
- if (wcześniej == null) {
- head = l.next;
- } else {
- wcześniej.next = l.next;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement