Advertisement
_andrea_

Untitled

Jul 10th, 2022
829
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.   public boolean prodottoPositivoR() {
  2.       return prodottoPositivoR(head);
  3.   }
  4.   private boolean prodottoPositivoR(Elemento e) {
  5.       if ((e == null) || (e.next == null)) {
  6.           return true;
  7.       } else if ((e.n * e.next.n) < 0) {
  8.           return false;
  9.       } else {
  10.           return prodottoPositivoR(e.next);
  11.       }
  12.   }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement