Input help!




I'm not sure where to start, please help.
Implement a program that:
Get the following from the user (no prompts):
first name,
last name,
birth year,
and height (in feet and inches; e.g., 5'10").
Note: You will need to get feet and inches for height separately.
To help you remember what to input, use prompts while you are developing. Then when ready to submit, do not output the prompts, just read in the values.
Subsequently,
approximates the user’s age as their birth year subtracted from the current year (2017).
calculates his/her height in centimeters
Note: 1 inch is 2.54 centimeters; moreover, there are 12 inches in one foot.
computes her/his average annual growth per year in centimeters, under the assumption that one’s height at birth is 51 cm.
Your implementation should be written such that it is easily readable by other programmers. Use comments where appropriate and use appropriate variable identifiers.
Example Program Run
Note:
As stated above, your application will not provide any input prompts to the user.
The input is expected the exact order as shown below in the green text below. Note that Jon Doe is 5’10”.
Then output the results precisely as shown in the red text below.





John
Doe
1999
5
10

Hello John Doe. You are 18 years old in 2017, and your height is 177.8 cm. That means that you grew an average of 7.04444 cm per year (assuming you were 51 cm at birth).


That's why your a student, you need to learn to try, then you will learn to code....
I have been trying but I can't get it to work
Hello cowboys18,

Look at your instructions like this:


Implement a program that :

1: Get the following from the user(no prompts) :
	first name,
	last name,
	birth year,
	and height(in feet and inches; e.g., 5'10").

Note: You will need to get feet and inches for height separately.

To help you remember what to input, use prompts while you are developing.Then when ready to submit,
do not output the prompts, just read in the values.

Subsequently, approximates the user’s age as their birth year subtracted from the current year(2017).

2: calculates his / her height in centimeters

Note : 1 inch is 2.54 centimeters; moreover, there are 12 inches in one foot.
3: Computes her / his average annual growth per year in centimeters, under the assumption that one’s
height at birth is 51 cm.

4: Your implementation should be written such that it is easily readable by other programmers.
Use comments where appropriate and use appropriate variable identifiers.


Start with number 1 and get that working then add number 2 etc. This will get you started with some of the variables you will need and your initial input. You will also have to consider steps 2, 3 and 4 when thinking bout the variables you will need, but they can be added later.

It is better to break down the requirements and work on small pieces at one time than to think about the whole program at once.

Hope that helps,

Andy
Hello cowboys18,

I have been trying but I can't get it to work


Post what you have done so those of us who are reading know what you have done.

And if you do not know:

PLEASE ALWAYS USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post.
http://www.cplusplus.com/articles/jEywvCM9/
http://www.cplusplus.com/articles/z13hAqkS/
Hint: You can edit your post, highlight your code and press the <> formatting button.
You can use the preview button at the bottom to see how it looks.

Andy
Topic archived. No new replies allowed.