Question: USING MATLAB TO SOLVE QUESTION. THANKS 5. The specific gravity of gold is 19.3. Write a MATLAB program that will ask the user to input

USING MATLAB TO SOLVE QUESTION. THANKS
5. The specific gravity of gold is 19.3. Write a MATLAB program that will ask the user to input the mass of a cube of solid gold in units of kilograms and display the length of a single side of the cube in units of inches. The output should display a sentence like the one shown that follows, with the length formatted to two decimal places.If the user types a negative number or zero for the mass of the cube, your program should display an error message and terminate. Sample Input/Output (two examples) Enter the mass of the cube [kilograms]: -3 Error: Mass must be greater than zero grams. Enter the mass of the cube [kilograms]: 0.4 The length of one side of the cube is 1.08 inches
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
