get from -1 to 10 using four nested functions and the only value you can iput in the code is -1 in matlab

main.m
function result = func1(x)
    result = x + 1;
end

function result = func2(y)
    result = 2 * y;
end

function result = func3(z)
    result = z + 10;
end

result = func3(func2(func1(-1)));
disp(result);
205 chars
15 lines

related categories

gistlibby LogSnag