Quote:
Originally Posted by Sane
But then are you not just back to square one, where it would become easier to use predefined library functions?
|
Yes it is easier to use the functions in time.h and that would be the first choice. but the OP may not have that option.
Quote:
Originally Posted by Simplesouljah
i read what he wrote, I was going to give a time from from 1900-2099...anything below or beyond those years and you would get an error, and have to input another date...
|
That could be easly incorporated in the code I posted. I'll leave it up to you to do that. All I'm giving you is the basic algorithm.
The functions in time.h will only go back to 1970, so if you want to go for 1900 you can't use those functions.