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