Fabinaci Series

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

clearall;

clc;
prompt='enter from the user';
num=input(prompt);
x=0;
y=1;
disp(y)
for i = 1: (num-1)
z=x+y;
disp(z)
x=y;
y=z;
end

You might also like