function Q2 %% calculation the fibonacci numbers fib(1)=1; fib(2)=1; for i=1:1000 fib(i)=fib(i-1)+fib(i-2); end %% calulation the square of the fibonacci numbers for i=1:100 fib2(i)=fib(i)*fib(i); end %% caluation the sum and the number of odd numbers sum=0; count=0; for i=1:1000 sum=fib(i); if (rem(fib(i),2)=1) count=count+1; end end disp(count); disp(sum); end