Given: 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.   Draw your Flowchart using the pseudocode below: 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

C++ Programming: From Problem Analysis to Program Design
8th Edition
ISBN:9781337102087
Author:D. S. Malik
Publisher:D. S. Malik
Chapter3: Input/output
Section: Chapter Questions
Problem 4PE: 4. During each summer, John and Jessica grow vegetables in their backyard and buy seeds and...
icon
Related questions
Question

Given:

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.

 

Draw your Flowchart using the pseudocode below:

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

 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 2 images

Blurred answer
Knowledge Booster
Mathematical functions
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
C++ Programming: From Problem Analysis to Program…
C++ Programming: From Problem Analysis to Program…
Computer Science
ISBN:
9781337102087
Author:
D. S. Malik
Publisher:
Cengage Learning
C++ for Engineers and Scientists
C++ for Engineers and Scientists
Computer Science
ISBN:
9781133187844
Author:
Bronson, Gary J.
Publisher:
Course Technology Ptr
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage