Ask Question
18 December, 06:04

2. Feet to Inches One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an argument, and returns the number of inches in that many feet. Use the function in a program that prompts the user to enter a number of feet and then displays the number of inches in that many feet.

+2
Answers (1)
  1. 18 December, 08:59
    0
    See the below the answer written in Matlab

    Explanation:

    function inches=feetToInches (feet)

    prompt='enter the value of feet in digits';

    feet=input (prompt) % ask for the value in feet that needs to be converted to inches

    inches = feet*12; % converts feet to inches

    x=['the value in inches is: ', num2str (inches) ];

    disp (x) %display the result of the convertion

    end
Know the Answer?
Not Sure About the Answer?
Find an answer to your question ✅ “2. Feet to Inches One foot equals 12 inches. Design a function named feetToInches that accepts a number of feet as an argument, and returns ...” in 📘 Computers and Technology if you're in doubt about the correctness of the answers or there's no answer, then try to use the smart search and find answers to the similar questions.
Search for Other Answers