% -----------------------------------------------------
% hypotenuse.m
% -----------------------------------------------------
% Compute the hypotenuse of a right triangle. 
% -----------------------------------------------------
% Notes: none
% -----------------------------------------------------
% Copyright and license details available at matlabmarina.com
%------------------------------------------------------

% Clear all variables and clear the command window
clear 
clc

% First side of the triangle
sideA = 3;

% Second side of the triangle
sideB = 4;

% Compute the hypotenuse of the triangle
hypsq = sideA^2 + sideB^2;
hyp = sqrt(hypsq);

% Display output
disp('The hypotenuse of the triangle');
disp(hyp);
