|
-
Problem filling an array..
Hi Guys,
First time posting here..
First off this is a college assignment and i'm not looking for a quick fix here just some direction.
I have to take a year (int) from user and then print out the calendar for that year. Months: 3 Across 4 Down.
I am trying to fill a 12[8] 2D Array 1 2D Element for each month.
It should look like: < array element >
JANUARY ------------ <0>
Mo Tu We Th Fr Sa Su <1>
1 2 3 4 5 6 <2>
7 8 9 10 11 12 13 <3>
14 15 16 17 18 19 20 <4>
21 22 23 24 25 26 27 <5>
28 29 30 31 <6>
--filled with spaces--- <7>
My problem is filling elements elements 2 to 7. If on the first week the first day is different each month how can I tell what the first day of the second week is going to be?
I have tried many things and it frying my head because it is a really early problem and can't go any further if I can't fix this.
Any ideas? Oh yeah i'm not really looking for code on how to do this..just logical advice..
Thanks..
JavaGuy
Similar Threads
-
Replies: 12
Last Post: 04-01-2007, 06:32 PM
-
Replies: 3
Last Post: 03-31-2007, 04:11 PM
-
Replies: 0
Last Post: 10-30-2002, 04:40 AM
-
Replies: 3
Last Post: 10-15-2002, 02:58 PM
-
By Narayan in forum VB Classic
Replies: 6
Last Post: 06-20-2001, 07:56 AM
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks