
% Check your understanding of if statements

x = input('Enter a number:\n');
y = 1;

if x < 0
    x = -x;
elseif x > 0
    x = 2 * x;
else
    y = 0;
end

fprintf('x is %0.3f, y is %0.3f\n', x, y);

