Implement a C++ program that reads eleven (11) characters and verifies if a sequence of characters is consistent with a date pattern DD-MON-YYYY where DD is a number of a day in a month, MON is an abbreviation of a month name and YYYY is a year number.
For example a sequence of characters 12-DEC-2011 is consistent with the pattern. A sequence 45-JUN-2000 is not consistent with the pattern because June does not have 45 days. Of course a sequence of characters AB-FEB-@@@@ is not consistent with the pattern because of the obvious reasons.
WHICH ONE IS SIMPLER? CAN YOU TELL?