944,030 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Unsolved
  • Views: 3052
  • C++ RSS
Oct 31st, 2009
0

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

Expand Post »
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’.
Reputation Points: 6
Solved Threads: 1
Posting Whiz in Training
samsons17 is offline Offline
225 posts
since Oct 2009
Oct 31st, 2009
0
Re: Identify someone's age by entering the IC number...
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.
Reputation Points: 673
Solved Threads: 125
Practically a Posting Shark
Sky Diploma is offline Offline
818 posts
since Mar 2008
Oct 31st, 2009
0

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

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.
Reputation Points: 6
Solved Threads: 1
Posting Whiz in Training
samsons17 is offline Offline
225 posts
since Oct 2009
Oct 31st, 2009
-7
Re: Identify someone's age by entering the IC number...
didn't your instructor tell you where that IC number comes from? AFAIK there is no online database of IC numbers.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Oct 31st, 2009
0
Re: Identify someone's age by entering the IC number...
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.
Reputation Points: 6
Solved Threads: 1
Posting Whiz in Training
samsons17 is offline Offline
225 posts
since Oct 2009
Oct 31st, 2009
-7
Re: Identify someone's age by entering the IC number...
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.
C++ Syntax (Toggle Plain Text)
  1. 100 25
  2. 101 15
  3. 102 32
  4. etc. etc

Then when the program asks for IC number, open the above file and read it until the program finds the right row.
Sponsor
Team Colleague
Featured Poster
Reputation Points: 5608
Solved Threads: 2282
Retired and Enjoying Life
Ancient Dragon is offline Offline
21,953 posts
since Aug 2005
Nov 1st, 2009
0
Re: Identify someone's age by entering the IC number...
Check few IC numbers carefully , may be it includes year of birth ,etc .
Reputation Points: 769
Solved Threads: 128
Banned
ithelp is offline Offline
1,910 posts
since May 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: STRUGGLING!! I am in dire need of some help
Next Thread in C++ Forum Timeline: ListBox example for Dev C++





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC