ComputerForum.com ComputerForum.com  
Go Back   Computer Forum > Computer Software > General Software

Reply
 
LinkBack Thread Tools Display Modes
Old 10-18-2005, 05:12 AM   #1 (permalink)
New Member
 
Join Date: Oct 2005
Posts: 1
Default C++ help...

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.
beny is offline   Reply With Quote


Old 10-18-2005, 07:17 AM   #2 (permalink)
SFR
SUPER MODERATOR
 
SFR's Avatar
 
Join Date: Nov 2004
Location: San Diego, USA
Age: 24
Posts: 4,046
Default

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"
__________________
The real danger is not that computers will begin to think like men,
but that men will begin to think like computers.
~Sydney J. Harris

I haven't lost my mind; I have a tape back-up somewhere.

What the world needs is more geniuses with humility, there are so few of us left.
~Oscar Levant

Relax, its only Ones and Zeros
SFR is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT +1. The time now is 09:57 AM.


Powered by: vBulletin Version 3.7.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
Copyright © 2002-2008 Computer Forum and Web Design Forum