Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function zad1r(n,i,c0)
- if(i<=n)
- if(mod(i,2)==0)
- disp(i);
- c1=0.5*c0
- i=i+1;
- zad1r(n,i,c1);
- else
- disp(i);
- c1=3*c0+1
- i=i+1;
- zad1r(n,i,c1);
- endif
- endif
- endfunction
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement