TASK DEFINITION: In this task, you are given a date in "mm/dd/yyyy" format. You need to check if the date is valid or not. Return 1 if it is valid, else return 0. A date is valid is the components month("mm"), day("dd") and year("yyyy") are all valid individually. A day(dd) is valid if it is greater than or equal to 1 and less than 30 or 31 depending upon the month(mm). Months which have 31 days are January, March, May, July, August, October, December. Rest of the months have 30 days except February which has 28 days if it is not a leap year and 29 days if it is a leap year. A month(mm) is valid if it lies in the range from 1 to 12 as there are 12 months in a year. A year is always valid if it is expressed in the form of "yyyy".
PROBLEM: 09/15/2072

SOLUTION: 1

PROBLEM: 14/05/1085

SOLUTION: 0

PROBLEM: 18/14/1137

SOLUTION:
0