my dog learned polymorphism
The moose likes Meaningless Drivel and the fly likes Calculate your age here Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Calculate your age here" Watch "Calculate your age here" New topic

Calculate your age here

Santosh Maskar
Ranch Hand

Joined: Jul 02, 2003
Posts: 226
This is pretty neat how it works out.

It takes less than a minute.......

Work this out as you read.

This is fun!

1. First of all, pick the number of times a week that you would

like to have dinner out. (try for more than once but less than10).

2. Multiply this number by 2

(Just to be bold)

3. Add 5. (Just because)

4. Multiply it by 50 - dont tell me u need a


5. If you have already had your birthday this year

add 1754.... If you haven't, add 1753.......

6. Now subtract the four digit year that you were


You should have a three digit number.

The first digit of this was your original number

(How many times you want to eat out each week.)

The next two numbers are... YOUR AGE! > >(Oh YES,it IS!!!)
Joyce Lee
Ranch Hand

Joined: Jul 11, 2003
Posts: 1392
Let me see...

Let D = the number of times a week that you would like to have dinner out
Let B = birthday
Let A = Age
Assume the birthday is over.

(((D * 2 ) + 5) * 50) + 1754 - B = 100D + A

simplify, simplify...
100D + 250 + 1754 - B = 100D + A

cancel both sides...
2004 - Birthday = Age !!!
[ August 17, 2004: Message edited by: Joyce Lee ]
Ranch Hand

Joined: Jul 14, 2004
Posts: 305
It doesn't work if you lie about the year you were born.

Obviously limited in mystical power! :roll:
Helen Thomas
Ranch Hand

Joined: Jan 13, 2004
Posts: 1759
By reversing the sum after calculating the age, perhaps life expectancy could be worked out too ?

Do you live in the country ? No -8
Partly -4
Yes do nothing

Le Cafe Mouse - Helen's musings on the web - Java Skills and Thrills
"God who creates and is nature is very difficult to understand, but he is not arbitrary or malicious." OR "God does not play dice." - Einstein
I agree. Here's the link:
subject: Calculate your age here
It's not a secret anymore!