Answer:
Check the explanation
Step-by-step explanation:
%Define the function CalculateSum().
function maxSum = CalculateSum(userNum1,userNum2,userNum3)
%Compute the maxSum.
maxSum = MaxValue(userNum1,userNum2)+userNum3
%End of the function CalculateSum().
end
%Define the function MaxValue().
function maxNum = MaxValue(numA,numB)
%Compare the elements numA and numB.
if(numA>numB)
%Store the value of numA in maxNum.
maxNum = numA;
%The else part.
else
%Store the value of numA in maxNum.
maxNum = numB;
%End of the if-else.
end
%End of the function MaxValue().
end
%Run the following code in the command prompt.
%Call the function CalculateSum().
CalculateSum(4, 7, 3)
The below image is the screenshot of the complete code: