Code:
#include <stdio.h>
main()
{
int day_code; /* day_code = 0 means the month starts on Sun
day_code = 1 means the month starts on Mon
day_code = 2 means the month starts on
Tues, etc. */
int days_in_month; /* number of days in month currently
being printed */
int leap_year; /* 1 means leap year; 0 means no leap year */
int day; /* counter for day of month */
int month; /* month = 1 is Jan, month = 2 is Feb, etc. */
int year = 0, f = 0, d = 0, c = 0;
do {
printf( "Enter year: " );
scanf( "%d", &year );
printf ( "%d", &year );
}while( year < 1776 );
while ((year % 400 == 0) && (year % 4 == 0) && (year % 100 > 0))
{
leap_year = 1;
}
c = year / 100;
printf ( "%d", &c );
d = year % 100;
printf ( "%d", &d );
f = 1 + (( 13 * 11 - 1 ) / 5) + d + ( d / 4 ) + ( c / 4 ) - 2*c;
printf ( "%d", &f );
return 0;
}
here's whats comes out:
Enter year: 1990
-1073743504-1073743516-1073743512-1073743508
now can anyone please help me and tell me why its giving me all these wacked out numbers?