Advertisement
Guest User

Untitled

a guest
Jun 26th, 2019
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.22 KB | None | 0 0
  1. function zad1r(n,i,c0)
  2. if(i<=n)
  3. if(mod(i,2)==0)
  4. disp(i);
  5. c1=0.5*c0
  6. i=i+1;
  7. zad1r(n,i,c1);
  8. else
  9. disp(i);
  10. c1=3*c0+1
  11. i=i+1;
  12. zad1r(n,i,c1);
  13. endif
  14. endif
  15. endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement