Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 178
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

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