Question: Please write in C code, not C++ Feet-Inches to Inches ASSIGNMENT: Write a program to convert feet and inches to just inches. Start by displaying

Please write in C code, not C++

Feet-Inches to Inches ASSIGNMENT: Write a program to convert feet and inches

Feet-Inches to Inches ASSIGNMENT: Write a program to convert feet and inches to just inches. Start by displaying how the inputs will be entered, followed by a blank line. Then, ask the user for their height in feet and inches (both as integers). Validate that the number of feet is greater than zero. Validate that the number of inches is 0 or more and less than 12. Create a function to convert the feet to inches and add the remaining inches, passing it both the feet and inches, and have the function return the number of total inches (as an integer). Example Run #1: (bold type is what is entered by the user) You will be asked to enter your height in feet and inches. (ex. 5 feet, 10 inches) Enter these numbers as 2 separate inputs. Enter your height in feet (as a whole number): -5 The feet entered must be greater than 0. Please re-enter your height in feet (as a whole number): 5 Enter your remaining height in inches: 12 The inches entered must be greater than or equal to 0 and less than 12. Please re-enter you remaining height in inches: 11 Your overall height is xx inches. The example run shows EXACTLY how your program input and output will look.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!