-->
当前位置:首页 > 题库

PROGRAMMING:Calculating age

Luz5年前 (2021-05-10)题库597
Define a birthday class, whose member variables have three shaping variables (date of birth): year, month, day; The construction method is provided to initialize the three member variables; Provide get and set methods of member variables; The member function has getage (), which is used to calculate the age of the birthday object on December 25, 2017. Write a program to test this class.
###Input format:
Enter the year, month, and day of birth (Note: the year, month, and day entered are separated by new lines)
###Output format:
Calculate the age
###Input example:
Here is a set of inputs. For example:
```in
one thousand nine hundred and ninety-five
twelve
twenty-three
```
###Output example:
The corresponding output is given here. For example:
```out
twenty-two
```







answer:If there is no answer, please comment