Question: C program The Assignment Part 1 Write a program that asks the user for the user's name and the user's height in inches. Your program
The Assignment Part 1 Write a program that asks the user for the user's name and the user's height in inches. Your program then replies with the user's name and height in feet and inches (not in centimeters like we did in Classwork 3). A sample run of your program might look like this: (The user's response is in orange.) Ask heghtin in PT[157% gcc -Wall height2.c PT[158]% ./a.out What is your name? Percival How tall are you in inches? 79 Hello, Percival. You are 6 feet and 7 inches tal1. PT[159)% Notes: 1. Please name your C program height2.c 2. A good starting point is your program from Classwork3. 3. You will want to use the division operator / and the modulus operator %. In C, when you divide two integer values, the remainder is thrown out. For example, 17/5 gives you 3 4. The modulus operator calculates the remainder of a division. For example, 17 % 5 gives you 2. 5. Think about how get 6 feet and 7 inches from 79 inches in the sample run above, using the / and % operators
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
