Answer:
Check the explanation
Step-by-step explanation:
Cube.m:
mass = input("Enter the mass of cube [kilograms]: ");
if(mass<=0)
disp("Error: Mass must be greater than zero grams")
else
fprintf("The length of one side of cube is %.2f inches",2.7*mass);
end
Output1
octave:2> source ( Cube.m Enter the mass of cube [kilograms]: octave:2>-3 Error: Mass must be greater than zero grams