Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

C program image text in transcribed
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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored 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

More Books

Students also viewed these Databases questions

Question

What is learning, and what are some basic forms of learning?

Answered: 1 week ago