Advertisement
Guest User

Untitled

a guest
Nov 29th, 2015
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. public void usuńNieparzyste(int licznik) {
  2. for (int a = 0; a < licznik; a++) {
  3. element l = head;
  4. element wcześniej = null;
  5. while (l != null && (l.value % 2) == 0) {
  6. wcześniej = l;
  7. l = l.next;
  8. }
  9. if (l != null) {
  10. if (wcześniej == null) {
  11. head = l.next;
  12. } else {
  13. wcześniej.next = l.next;
  14. }
  15. }
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement