PROGRAMMING:C programming experiment 2-3-1
Height prediction.
Every parent is concerned about their children's adult height. According to the knowledge of physiological health and mathematical statistics, the factors that affect children's adult height include heredity, eating habits and physical exercise. The height of a child as an adult is closely related to the height of his parents and his own gender.
Let faheight be father's height and moheight be mother's height
Male adult height = (faheight + moheight) × zero point five four
Female adult height = (faheight) × 0.923+ moHeight)/2cm
In addition, if you like physical exercise, your height can be increased by 2%; If you have good healthy eating habits, your height can be increased by 1.5%.
Try to program from the keyboard to input the user's gender (stored in the character variable sex, input the character f or F for female, input the character m or m for male), parents' height (stored in the real variable, faheight for father's height, moheight for mother's height), whether to like physical exercise (stored in the character variable sports, input the character y or y for love, Input character n or n to indicate dislike), whether you have good eating habits (stored in character variable diet, input character y or y to indicate good, input character n or n to indicate bad) and other conditions, using the given formula and height prediction method to predict height.
###Input format:
In one line, gender, father's height, mother's height, whether they like physical exercise, whether they have good eating habits are given, and the data are separated by spaces.
###Output format:
Output the predicted height to one decimal place.
###Input example:
```in
F 182 162 N Y
```
###Output example:
The corresponding output is given here. For example:
```out
167.5cm
```
answer:If there is no answer, please comment
Every parent is concerned about their children's adult height. According to the knowledge of physiological health and mathematical statistics, the factors that affect children's adult height include heredity, eating habits and physical exercise. The height of a child as an adult is closely related to the height of his parents and his own gender.
Let faheight be father's height and moheight be mother's height
Male adult height = (faheight + moheight) × zero point five four
Female adult height = (faheight) × 0.923+ moHeight)/2cm
In addition, if you like physical exercise, your height can be increased by 2%; If you have good healthy eating habits, your height can be increased by 1.5%.
Try to program from the keyboard to input the user's gender (stored in the character variable sex, input the character f or F for female, input the character m or m for male), parents' height (stored in the real variable, faheight for father's height, moheight for mother's height), whether to like physical exercise (stored in the character variable sports, input the character y or y for love, Input character n or n to indicate dislike), whether you have good eating habits (stored in character variable diet, input character y or y to indicate good, input character n or n to indicate bad) and other conditions, using the given formula and height prediction method to predict height.
###Input format:
In one line, gender, father's height, mother's height, whether they like physical exercise, whether they have good eating habits are given, and the data are separated by spaces.
###Output format:
Output the predicted height to one decimal place.
###Input example:
```in
F 182 162 N Y
```
###Output example:
The corresponding output is given here. For example:
```out
167.5cm
```
answer:If there is no answer, please comment