algorithm to convert days into years months days? stepwise
Answers
Answered by
0
Explanation:
So you can complete the calculation of the year with the following: const int DAYS_IN_100_YEARS = (100*365) + 24; year += 100 * (N / DAYS_IN_100_YEARS) + (N < DAYS_IN_100_YEARS ? 1 : 0); // Add an extra day for the first leap year that occurs every 400 years.
Similar questions