#include #include using namespace std; int main() { float day = 3; float month = 7; float year = 2008; int JDN = 0; int DayofWeek; int intRes1 = 0; int intRes2 = 0; int intRes3 = 0; if((year > 1582) || // flags all years greater than 1582 (month > 10) && (year == 1582) || // flags months over 10 in 1582 (month == 10) && (day > 15) && (year == 1582)) // flags month 10 and days over 15 in year 1582 intRes1 = int(2- year /100 + year / 400); intRes2 = int(365.25 * year); intRes3 = int(30.6001 * (month + 1)); JDN = int((intRes1 + intRes2 + intRes3 + day) + 1720944.5); DayofWeek = ((JDN + 3) % 7); cout << DayofWeek ; getchar(); return 0; }