Looking for a VERY basic little C program (console). Needs to be no more than 50ish lines. Will need the actual C code.
(1) user needs to input / enter:
- Day of week (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, or Sunday)
- Year (numeric - e.g. 2001)
- Month (numeric - e.g.: 1)
- Day (numeric - e.g.: 30)
- Hour
- Minute
- AM/PM (e.g. AM)
(2) The program displays the entered date in this format:
HH:MM AM/PM
MMMM, YYYY-MM-DD
Example:
10:43 AM
Monday, 2010-03-23
(3) Every time the user presses any key (except "q") 1 minute is added. The program counts up by minute (clear screen and show new date/time, not move it down)
(4) If the user presses "q" the program quits/closes
Leap years needs to be taken into consideration.
IF YEAR / 4 leaves a remainder than it is not a leap year.
No multi-dimensional arrays
No SWITCH statements
IF/ELSE is okay
WHILE is okay
Nothing fancy :) Simple.