function [V, S, u] = teleso(tel, a, b, c)
%% documentation should be here!!

V = NaN; S = NaN; u = NaN;
switch tel
    case 'kvadr'
        if nargin == 4
            [V, S, u] = kvadr(a, b, c);
        else
            fprintf('Wrong input!');
        end
    case 'valec'
        if nargin == 3
            [V, S, u] = valec(a, b);
        else 
            fprintf('Wrong input!');
        end
    otherwise, disp('Bad input.');
end
end

function [V, S, u] = kvadr(a, b, c)
    V = a*b*c;
    S = 2*(a*b+a*c+b*c);
    u = sqrt(a^2+b^2+c^2);
end

function [V, S, u] = valec(r, h)
    V = pi*r^2*h;
    S = 2*pi*r*(r+h);
    u = sqrt(h^2 + 4*r^2);
end

