You are viewing a single comment's thread. Return to all comments →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/U1u7Zz4ngVg
string dayOfProgrammer(int year) { if(year == 1918) return "26.09.1918"; if( (year <= 1917 && year % 4 == 0) or (year > 1918) && (year%400 == 0 or ((year%4 == 0) & (year%100 != 0)))) return "12.09."+to_string(year); return "13.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 →
Here is my c++ solution, you can watch the explanation here : https://youtu.be/U1u7Zz4ngVg