if mod(x,2)==0
a = eye(x);
b = fliplr(a);
c= a+b;
else
a = eye(x);
b = fliplr(a);
c= a+b;
c(round(x/2),round(x/2)) = 1;
end
I am getting the right solution on software ... here it is failing ... please help me
solution is in c, output is in y which doesn't exist in workspace.
Project Euler: Problem 2, Sum of even Fibonacci
835 Solvers
338 Solvers
124 Solvers
Find the square of the sum of the digits of a number
119 Solvers
116 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!