Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

How old am I?

Posted on 1998-06-03
5
Medium Priority
?
171 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 5

Accepted Solution

by:
julio011597 earned 300 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

610 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