Create a console application which will ask the user to enter a year in the format of YYYY (ie.2012,2010,or 1999) .

Create a console application which will ask the user to enter a year in the format of YYYY (ie.2012,2010,or 1999) .
If the user enters an invalid year format for example 12,-2,99,then the program shows the message :
You entered an invalid year format
The program continues to ask the user to enter a valid year format.
The program will then determine if the year entered is a leap year or not .
If the year entered by the user is a leap year ,the program shows an appropriate message. Sample message is given below:
The year 2012 is a leap year
If the year entered is not a leap year,then show an appropriate message.Sample message is given below:
The year 2010 is not a leap year.
PROBLEM 2)
Create a console application which will ask the user to guess a number.
The developer of the Code will choose a secret number between 0 and 20.
The user will be given three attempts to guess the number.
If the user enters the correct number,the following message will be displayed on the screen :
Well done ,you guessed correctly !
If the secret number is lower than the number entered by the user ,then the following message will be displayed on the screen:
Your guess is too low,please try again”, otherwise show the message “Your guess is too high , please try again”.
If the user has used up all their attempts without guessing the correct number , the message will be displayed as
Hard luck, the number was n (where n=secret number)