|
-
Dec 19th, 2000, 07:14 AM
#1
Thread Starter
New Member
Change of plan, begginer seiks help
Can you write a pgm that will use this algorithm to find the day of the week from any date between the 1st January 1800 and the 31st December 1999
1 Take the last two digits of the year
2 add a quarter of this neglecting any remainder
3 add the day of the month
4 for January add 1 (if a leap year add 0)
february add 4 (if a leap year add 3)
march add 4
april add 0
may add 2
june add 5
july add 0
august add 3
september add 6
october add 1
november add 4
december add 6
5 for 1800 - m1899 add 2
1900 onwards add 0
6 divide the result by 7 and the remainder gives the day of the week
1= sunday 2 = monday 3 = tuesday 4 = wednesday 5 =
thursday 6 = friday 7 = saturday
write a pgm that will accept the date in dd:mm:yyyy then using the above method calculate which day of the week it falls on and display this date
-
Dec 19th, 2000, 07:28 AM
#2
Frenzied Member
Is this coursework or something? Seems a bit well-defined to me.
Harry.
"From one thing, know ten thousand things."
-
Dec 19th, 2000, 07:53 AM
#3
Frenzied Member
He's trying to con us, lynch him!!!
If it wasn't for this sentence I wouldn't have a signature at all.
-
Dec 19th, 2000, 10:37 AM
#4
One, i have found the answer to this, and its actually quite easy.
Two, you wont be able to get any one to do your homework, but they will help.
-
Dec 19th, 2000, 12:48 PM
#5
Frenzied Member
Originally posted by Sam Finch
He's trying to con us, lynch him!!!
Wow Sam is mean
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

-
Dec 19th, 2000, 01:14 PM
#6
Monday Morning Lunatic
Has he ever not been?
Robert - to exactly answer your question, yes.
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|