Progam Help

A C++ program that determines exactly how many hours have passed since a previous historical event happened. for example if the user enterd the hour and date of the historical event (including the time of day in military format, the month in string format, the day of the month in integer format and year in 4 digit format) then your program would calculate the number of hours between then and the present time. Note you should take into account the extra days due to leap years and the numbers of days in a month.

for example if the user entered 1400 hours for the hour , July for the month, 4 for the day and 1776 for the year, your program would calculate and return the number of hours that have passed since the declaration of independence.

Hint: looking up the Gregorian calendar and leap years on Wikipedia can give some useful information on taking leap years into account
Seems pretty easy... what have you coded so far? What specific help do you need?

http://www.cplusplus.com/forum/general/187901/
Last edited on
just need help with catching the leap years and months that have different number of days
Topic archived. No new replies allowed.