• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 172
  • Last Modified:

How old am I?

Is there a simple procedure that tells me how old I am, if I know my birthday and todays date?
0
rainbowsoftware
Asked:
rainbowsoftware
  • 3
1 Solution
 
julio011597Commented:
Should be:

--//--
age := year_now - year_born;
if month_now < month_born then Dec(age);
else if (month_now = month_born) and (day_now < day_born) then Dec(age);
--//--

Feel free to ask more.

Regards, julio
0
 
Pegasus100397Commented:
Apart from the fact that that is not an age - unless you are used to tell your friends you are 7152 days old -, i cannot see any loop in my code...!?

-julio
0
 
julio011597Commented:
Age is a stage of mind. No computer program can tell you
what is your real age :-)
0
 
kjtengCommented:
rainbow, please, grade this question... grading is your part of the work.

Thanks, julio
0
 
julio011597Commented:
Julio, your procedure is just perfect, please receive 100 pts.

kjteng, your comment is true, so maybe I should forget all about how old I am.

Best regards
Rainbow
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now