Question: C++ code please Various websites like Wikipedia or IMDB list not just a person's birthdate but also the persor's current age. Given a person's birthdate
Various websites like Wikipedia or IMDB list not just a person's birthdate but also the persor's current age. Given a person's birthdate and current date, output the persor's age in years. The custom is to round down. If the input is 7120002152015 , the output is 14 (because the person hasnit yet reached their 15 th birthday). A person less than 1 has age 0 . Hints: - Start by computing currage just as the difference in years. Then, use an if else statement to determine whether to decrement currage - One reason to decrement is if the current month is less than the birth month (no birthday yet this year). - Another reason to decrement is if the current month equals the birth month, but the current day is less than the birth day
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
