| Title |
calendar.c |
| URL |
http://www.cprogramming.com/source/calendar.c |
| Category |
1 |
| Description |
This program prints a calendar in .txt format for a year. The user enters the year the calendar is for. This calandar will indicate whether or not the calendar is a leap year calendar. |
| Contact |
Herman Garcia
|
| Added |
08-10-2002 at 01:33 p.m. |
| Last Updated |
08-10-2002 at 06:14 p.m. |
|
|
|
| Current Rating |
3.75 |
| Rate Resource |
|
|
| Number of Reviews |
2 |
|
Review this Resource
|
| Reviews: |
- Useful program. I found that the output looks bad when using Windows text pad but looks very nice when opening it with wordpad.
posted at 10:47 p.m. on 09-06-2010
- Looks like the Code is all jumbled up. But I managed to clean up as follows:
#include statements are missing the file names:
#include <stdio.h>
#include <stdlib.h>
Also I changed the line which says:
for ( day = 1; day <= 1 + day_code * 5; day++ ) fprintf(fout," " ); TO
for ( day = 1; day <= 1 + day_code * 4; day++ ) fprintf(fout," " );
Notice 4 instead of 5, which aligns the dates of first line each month better with Text for days of week.
Also I changed the line:
fprintf(fout," " );
TO:
fprintf(fout," " );
Notice 2 spaces instead of one space again to align the dates beter.
Try these changes, the out put looks better
posted at 02:34 a.m. on 02-14-2010
|
|