We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Day of the Programmer
Day of the Programmer
Sort by
recency
|
1507 Discussions
|
Please Login in order to post a comment
Here's my java solution if(year>=1919 && year<=2700){ if(year%4==0 && (year%100!=0 || year%400==0)){ return 12+".09"+"."+year; }else{ return 13+".09"+"."+year; } }else if(year>=1700 && year<=1917){ if(year%4==0){ return 12+".09"+"."+year; }else{ return 13+".09"+"."+year; } }else{ return "26.09.1918"; }
JavaScript
Here is my c++ solution, you can watch the explanation here : https://youtu.be/U1u7Zz4ngVg
java(8)
can anybody explain to me how 2017 is a leap year but 2016 is not???