You are viewing a single comment's thread. Return to all comments →
c++ solution:
string dayOfProgrammer(int year){ int day = 13; if (year < 1918) { if (year % 4 == 0) { day -= 1; } } else if (year == 1918) { day += 13; } else { if (year % 400 == 0 || (year % 4 == 0 && year % 100 != 0)) { day -= 1; } } return to_string(day) + ".09." + to_string(year); }
Seems like cookies are disabled on this browser, please enable them to open this website
Day of the Programmer
You are viewing a single comment's thread. Return to all comments →
c++ solution: