Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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++

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Elementary Statistics

Authors: Mario F. Triola

12th Edition

0321836960, 978-0321836960

Students also viewed these Programming questions