Write a MATLAB program to find hypotenuses and Area of Triangle h^2+b^2=c^2 A = ½ b h
%CODE
h=input("Enter value of h : ")
b=input("Enter value of b : ")
%hypotenuses
c = (h^2 + b^2)^(0.5);
%Area calculation
A = (0.5)*(b*h);
fprintf("hypotenuses : %f\n",c)
fprintf("Area : %f",A)
%OUTPUT
Get Answers For Free
Most questions answered within 1 hours.