> I give up. Clearly I'm too stupid to figure this out.
You just forgot a "-1" in your calculation of age, when the person hasn't
had their birthday yet this year:
currentAge = 2010 - birthYear - 1
With that correction it should be pretty trivial to solve for the age using
whatever method you originally used.
Post a reply to this message
|