Solved

How old am I?

Posted on 1998-06-03
5
162 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.
This is a video that shows how the OnPage alerts system integrates into ConnectWise, how a trigger is set, how a page is sent via the trigger, and how the SENT, DELIVERED, READ & REPLIED receipts get entered into the internal tab of the ConnectWise …

930 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

15 Experts available now in Live!

Get 1:1 Help Now