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.
They are correct, I just fixed my logic and it went well.
" else if (m2 < m1)
{
if(y2 > y1)
{
Console.WriteLine(0);
return;
}
....
" in the month condition
"else if (d2 < d1)
{
if(y2 > y1 || m2 > m1)
{
Console.WriteLine(0);
return;
}
...
"in the days condition
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Library Fine
You are viewing a single comment's thread. Return to all comments →
They are correct, I just fixed my logic and it went well. " else if (m2 < m1) { if(y2 > y1) { Console.WriteLine(0); return; } .... " in the month condition
"else if (d2 < d1) {
if(y2 > y1 || m2 > m1) { Console.WriteLine(0); return; } ... "in the days condition