Question:

Create a program that will get the user’s AGE, using his/her Birthyear.?

by  |  earlier

0 LIKES UnLike

helow!

askdljadliajdlajdadadadadadadadadadada...

 Tags:

   Report

4 ANSWERS


  1. http://www.bikoy.com/harvey/articles/Tur...


  2. Here's the basic formula: Current Year - Birth Year = Age

    For example, suppose we are in 2008 and you were born in 2001.

    The data, inputted  in the program would yield the following:

    2008 - 2001 = 7

    Use this and the program/language you have and off you go. Have fun.

  3. In what program?

  4. If all you have is birthyear, Caldwood's answer is the best you can do. If you have the whole birthdate,

    1) Get birthdate

    2) Get systemdate

    3) Age = year(birthdate) - year(systemdate)

    4) if month(birthdate) > month(systemdate) || ((month(birthdate) == month(systemdate)) && (day(birthdate) > day(systemdate)) Age -= 1

Question Stats

Latest activity: earlier.
This question has 4 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.