Age in Minutes

This is a discussion on Age in Minutes within the C++ Programming forums, part of the General Programming Boards category; Hi, I'm trying to make a program to find my age in minutes. No, this is NOT a homework question, ...

  1. #1
    Registered User harryP's Avatar
    Join Date
    Sep 2002
    Posts
    124

    Age in Minutes

    Hi, I'm trying to make a program to find my age in minutes. No, this is NOT a homework question, I don't even take programming classes, but I think it'd be sorta interesting to find out how old I am in minutes. I'm stuck, though. Like, what math stuff would I need to do to find out my age? I was thinking of finding out my age in months, which is simple enough. Then maybe find out in days. The problem with that is that every 4 years there are 366 days a year, not 365, so I'd have to include that. Then maybe to hours and then minutes. But how would I go about doing this? Thanks!

    Brendan
    Draco dormiens nunquam titallandus.
    Console Graphics Library: http://www.geocities.com/steve_alberto/cgl.html

  2. #2
    Registered User harryP's Avatar
    Join Date
    Sep 2002
    Posts
    124
    Actually never mind I got it. Pretty simple I guess I'm just dumb.

    Brendan
    Draco dormiens nunquam titallandus.
    Console Graphics Library: http://www.geocities.com/steve_alberto/cgl.html

  3. #3
    RoD
    RoD is offline
    Redundantly Redundant RoD's Avatar
    Join Date
    Sep 2002
    Location
    Missouri
    Posts
    6,331
    could you post the code here? I am new to c++ and would be very interested to learn from it.

  4. #4
    Its not rocket science vasanth's Avatar
    Join Date
    Jan 2002
    Posts
    1,683
    in excel there is a function called days360.. Witht his you can find the number of days between 2 dates.. So find it and then convert the number of days into minutes....

  5. #5
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    Age in years: 18
    18 x 365.25 days per year = 6574.5 days old
    6574.5 x 1440 minutes per day = 9467280 minutes old

  6. #6
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    Posts
    892
    That will not always give you the exact age in minutes though BMJ
    Try not.
    Do or do not.
    There is no try.

    - Master Yoda

  7. #7
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    Posts
    1,380
    then add the current time to that

  8. #8
    Green Member Cshot's Avatar
    Join Date
    Jun 2002
    Posts
    892
    That won't work either.

    example:
    You are born on Jan. 1st during a leap year. One year later based on your formula, you'd be:

    1 x 365.25 days old
    but in actuality, you'd be 1 x 366 days old...

    I've done this problem before so I know the solution
    Try not.
    Do or do not.
    There is no try.

    - Master Yoda

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. wow...technology today...
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 29
    Last Post: 02-01-2003, 07:37 PM
  2. How to calc. your age in days..?
    By Gugge in forum C Programming
    Replies: 7
    Last Post: 03-13-2002, 03:40 AM
  3. please help me fix my coding for this assignment
    By sayeem81 in forum C Programming
    Replies: 1
    Last Post: 01-29-2002, 02:45 AM
  4. can someone help me with this assignment
    By sayeem81 in forum C Programming
    Replies: 3
    Last Post: 01-23-2002, 10:56 AM
  5. Converting MInutes to Hours and MInutes
    By Unregistered in forum C Programming
    Replies: 3
    Last Post: 08-30-2001, 09:07 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21