Solved

How old am I?

Posted on 1998-06-03
5
161 Views
Last Modified: 2010-04-06
Is there a simple procedure that tells me how old I am, if I know my birthday and todays date?
0
Comment
Question by:rainbowsoftware
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 100 total points
ID: 1350062
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
 
LVL 3

Expert Comment

by:Pegasus100397
ID: 1350063
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
 
LVL 5

Expert Comment

by:julio011597
ID: 1350064
Age is a stage of mind. No computer program can tell you
what is your real age :-)
0
 
LVL 2

Expert Comment

by:kjteng
ID: 1350065
rainbow, please, grade this question... grading is your part of the work.

Thanks, julio
0
 
LVL 5

Expert Comment

by:julio011597
ID: 1350066
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now