Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
0
Tried 1/1/1999 as input. The output wasn't as expected. As I saw in your code, in the else statement from check(), the program would output the right result for 01/01/1999, for example, not 1/1/1999. Try to take it on cases, when the day and/or month is/are <=9 and >9, or use a date library(but you will have to rewrite your entire code). So I would recommend the first option.
4th Jan 2020, 6:19 PM
molang
molang - avatar