Question:
Given a year, check if the year is leap year or not. If yes, the output should be “Leap Year”. Else output should be “Not a Leap Year”. The input should be a positive four digit number. Else, the output should be “Invalid Year”.
Sample Input 1 :
Enter the Year
2016
Sample Output 1 :
Leap Year
Sample Input 2 :
Enter the Year
2001
Sample Output 2 :
Not a Leap Year
CODE:–
Tags:
java interview programs for experienced | java interview programs for freshers pdf | java coding questions for 5 years experience | java programming interview questions – geeksforgeeks |
java programming interview questions and answers for freshers | java programs asked in interview for automation tester | java coding interview questions for experienced professionals
| java coding interview questions pdf
ConversionConversion EmoticonEmoticon