954,116 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Identify someone's age by entering the IC number...

Hi..
I'm wondering how could we make a program that could determine one's age by just entering his or her identification card number..
Is there any function in c++ that we can use??
this is the sample of question...

Movies in cinema has ratings to suit ones appropriate age level and mentality. To reserve a cinema ticket online, users are required to enter their IC number to verify their age. If the patron’s is aged 21 and above, they are in the ‘adult’ category. Patrons between the age of 20 and 13 are ‘teenagers’. If the patron is aged below 12, they are in the ‘child’ category. Patron’s who are above the age of 59 are in the category of ‘senior citizen’.

samsons17
Posting Whiz in Training
233 posts since Oct 2009
Reputation Points: 6
Solved Threads: 1
 

Well firstly you will need a database or a particular condition to determine the age of the person with the ID card number.

If this is a project for you ..... read through the material to get the basic condition. And then you can interpret it in the code :)

Happy Coding.

Sky Diploma
Practically a Posting Shark
864 posts since Mar 2008
Reputation Points: 673
Solved Threads: 130
 

could you tell me what do i suppose to read??
thank you...

Well firstly you will need a database or a particular condition to determine the age of the person with the ID card number.

If this is a project for you ..... read through the material to get the basic condition. And then you can interpret it in the code :)

Happy Coding.

samsons17
Posting Whiz in Training
233 posts since Oct 2009
Reputation Points: 6
Solved Threads: 1
 

didn't your instructor tell you where that IC number comes from? AFAIK there is no online database of IC numbers.

Ancient Dragon
Retired & Loving It
Team Colleague
30,040 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 

Actually this is not a project that i suppose to do..
I just accidentally found this question..
So I'm wondering how should i do this kind of program...
could anyone helps me?
because i really curious about this, plus i'm still new
so there are a lot of things that i dont know yet...
Please help me...thanks...:)

didn't your instructor tell you where that IC number comes from? AFAIK there is no online database of IC numbers.
samsons17
Posting Whiz in Training
233 posts since Oct 2009
Reputation Points: 6
Solved Threads: 1
 

In that case you will probably have to create your own database if IC numbers and related ages. Just use a standard text editor to create it, something like this where the first column is an IC number and the second column is an age.

100   25
101   15
102   32
etc. etc


Then when the program asks for IC number, open the above file and read it until the program finds the right row.

Ancient Dragon
Retired & Loving It
Team Colleague
30,040 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,341
 

Check few IC numbers carefully , may be it includes year of birth ,etc .

ithelp
Nearly a Posting Maven
Banned
2,230 posts since May 2006
Reputation Points: 769
Solved Threads: 128
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You