Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > C > Re: Taking Time...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 8 Topic 26134 of 26955
Post > Topic >>

Re: Taking Time and Date from System in C

by Flash Gordon <spam@[EMAIL PROTECTED] > May 9, 2008 at 08:26 PM

Tameem wrote, On 09/05/08 19:59:
> i am a new C programmer. i want to calculate someone's age. my input
> would be his birth date. like : Date: 07
>         Month: 12
>         Year: 1988
> and the program will take the current date from system and calculate
> his age,
> how can i do that in C. please inform me.

Provide a method for the user to provide input. My preference would be 
using the command line, but you might be required to send prompts to 
stdout and read input from stdin. Write some code to pass and validate 
the input. Write some code find out the current date. Write some code to 
find the difference between the two. C provides various library 
functions to assist in these tasks.

If you are completely stuck then you should probably ask your tutor for 
extra help. Otherwise make an attempt and post it here.
-- 
Flash Gordon
 




 8 Posts in Topic:
Taking Time and Date from System in C
Tameem <etameem@[EMAIL  2008-05-09 11:59:11 
Re: Taking Time and Date from System in C
Morris Dovey <mrdovey@  2008-05-09 14:11:28 
Re: Taking Time and Date from System in C
roberson@[EMAIL PROTECTED  2008-05-09 19:25:13 
Re: Taking Time and Date from System in C
Flash Gordon <spam@[EM  2008-05-09 20:26:56 
Re: Taking Time and Date from System in C
Tameem <etameem@[EMAIL  2008-05-09 13:06:19 
Re: Taking Time and Date from System in C
Morris Dovey <mrdovey@  2008-05-09 15:17:33 
Re: Taking Time and Date from System in C
jacob navia <jacob@[EM  2008-05-09 22:22:51 
Re: Taking Time and Date from System in C
Richard Heathfield <rj  2008-05-09 20:36:14 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 2:48:30 CDT 2008.