C++ help...

beny

New Member
Can anyone help me with this please....I will be very thankful.

Print a calendar for any month of any year from 1753 forward. This is similar to the cal utility on the Linux system. Prompt the user for the numeric month and year to be displayed.
The program shall utilize functions. No date shall be earlier than January 1753 (an earlier date is an error condition). Your calculations to determine the first day of the month shall start with January 1, 1753 as a Monday. Provide error detection and handling. The cal utility shall not be used in the execution of the program. You may not use Zeller's Congruence or anything like unto it.
 
This sounds like a school project that should be done on your own.... Never heard of Zeller's Congruence.. gonna go look it up!


This might not help, but here is my 2.5 cents anyway:

Here is an algorythm I created on my TI-83+ calculator many... many years ago....

This might get you on the right track... its in "TI-BASIC".. so you have to play around with the syntax...

Disp "DAY?"
Input D
Disp "MONTH?"
Input M
If M=1
Then
13->M
End
If M=2
Then
14->M
End
Disp "YEAR?"
Input Y
If M=13 or M=14:Then
Y-1->Y
End
(D+(2M)+int((3(M+1))/5)+Y+int(Y/4)-int(Y/100)+int(Y/400)+2)->A
int(A/7)->T
A-(7*T)->V
If V=0: Disp "SAT"
If V=1: Disp "SUN"
If V=2: Disp "MON"
If V=3: Disp "TUES"
If V=4: Disp "WEDS"
If V=5: Disp "THURS"
If V=6: Disp "FRI"
 
Back
Top