Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public boolean prodottoPositivoR() {
- return prodottoPositivoR(head);
- }
- private boolean prodottoPositivoR(Elemento e) {
- if ((e == null) || (e.next == null)) {
- return true;
- } else if ((e.n * e.next.n) < 0) {
- return false;
- } else {
- return prodottoPositivoR(e.next);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement