% roots - compute square, cube, and fourth roots of a number.
% Get the number
x = input('Please enter a number: ');
if x <= 0
    disp('Sorry, the number must be positive.');
else
    disp(['square root is ' num2str(sqrt(x))]);
    disp(['cube root is ' num2str(nthroot(x,3))]);
    disp(['fourth root is ' num2str(nthroot(x,4))]);
end
