0%

UVA 11219

UVA 11219 - How old are you

How old are you

題意:

檢查歲數有沒有問題。
• ‘Invalid birth date’, if the calculated age is impossible (still going to be born).
• ‘Check birth date’, if the calculated age is more than 130.
• the calculated age (years old only), otherwise.
• If the two dates are the same, the output should be ‘0’.

思路:

檢查年月日按照上面規則逐一做出來。

程式碼: